Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --command and --scratch-dir to run command #1163

Merged
merged 1 commit into from
Jul 12, 2022

Conversation

alexarchambault
Copy link
Contributor

@alexarchambault alexarchambault commented Jul 8, 2022

scala-cli run --command basically prints the command scala-cli run would have run (with one argument per line). This can be passed over to xargs for example, but users can also manually pre-process these arguments if they feel like it. This is also useful when debugging for example (it was for me when working on #1129).

--scratch-dir makes scala-cli run write temporary stuff (launchers, .js files, …) inside the passed directory rather than in a temporary OS location, and makes Scala CLI not delete these temporary files. When used in conjunction with --command, that allows users to later run the command, even if it involves temporary files.

(Bits from #1129, that don't involve Spark.)

@mpkocher
Copy link
Contributor

mpkocher commented Jul 8, 2022

Perhaps it would be useful to consider renaming this to --scratch-dir to avoid confusion with the standard env varsTMPDIR, TEMP mechanism of defining a temporary directory?

The current naming scheme (e.g., --tmp-dir) is perhaps a little bit confusing and I suspect the behavior would not be completely obvious.

@alexarchambault alexarchambault force-pushed the run-command branch 2 times, most recently from 3945c33 to 5131ec8 Compare July 8, 2022 16:31
@alexarchambault alexarchambault changed the title Add --command and --tmp-dir to run command Add --command and --scratch-dir to run command Jul 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants