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

fix for 2954 running script in root dir #2988

Merged
merged 2 commits into from
Jul 1, 2024

Conversation

philwalk
Copy link
Contributor

Adds fix for running script from the root directory.
Fixes #2954.

The problem occurs as a side-effect of calling workspace.baseName from within scala.build.input.Inputs.scala
which throws an exception if workspace equals os.root.

See the calls to .baseName near lines 155 and 469.

The fix is to set baseName to an empty String if workspace equals os.root.

A change was also made to scala.cli.ScalaCli.scala to insure that the logfile directory exists.

Copy link
Contributor

@Gedochao Gedochao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented on some nitpicks.
I'm thinking if we can test that it works on the CI smh... maybe in a docker container? Perhaps doesn't have to be done in this PR though.

@Gedochao Gedochao merged commit 7a23f2b into VirtusLab:main Jul 1, 2024
75 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot run a script in the root directory
2 participants