joeriks
joeriks

Reputation: 3462

Can I access ScriptArgs from a Script Pack?

For ScriptCs scripts I'd like to write a Script Pack that is using command line arguments.

scriptcs myscript.csx -- some args

Within a script I use ScriptArgs, but is it also available somehow from within a Script Pack?

Upvotes: 0

Views: 225

Answers (2)

khellang
khellang

Reputation: 18102

Yes, the IScriptPackSession interface which is passed to your script pack on initialization now has a property called ScriptArgs :) See the source.

Upvotes: 2

Filip W
Filip W

Reputation: 27187

Not with the current design.

With that said, that's a good idea - I suggest you file an issue on github - https://github.com/scriptcs/scriptcs

Upvotes: 1

Related Questions