I wrote a Powershell script, and I call some functions from external scripts using Dot sourcing. The scripts I try to call are not detected after making the main script executable. Do I have to compile the scripts to be called as well?
-
Include the scripts in the main script and compile the whole thingTheo– Theo2022-02-28 15:37:03 +00:00Commented Feb 28, 2022 at 15:37
-
How should i do? Writing everything in one file?Dennis– Dennis2022-02-28 16:11:55 +00:00Commented Feb 28, 2022 at 16:11
-
Yep, I guess that's the best way..Theo– Theo2022-02-28 17:24:12 +00:00Commented Feb 28, 2022 at 17:24
-
Perhaps this answer helps.mklement0– mklement02022-02-28 20:44:18 +00:00Commented Feb 28, 2022 at 20:44
-
I merged everything into one file. The solution proposed in the link of mklement0 is interesting, but in my case I don't have to execute scripts in sequence, and I need to pass parameters to the functions. Thanks a lot to everyone.Dennis– Dennis2022-03-01 21:17:20 +00:00Commented Mar 1, 2022 at 21:17
|
Show 1 more comment