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

Print a better error when workspace path contains the File.pathSeparator #1985

Merged
merged 1 commit into from Mar 31, 2023

Conversation

Gedochao
Copy link
Contributor

Fixes #1411

: is the File.pathSeparator on UNIX systems, used as the separator on classpaths by the compiler.
Unfortunately, it seems that there is no way of escaping it, even though : is a valid character for directory names.
The recommended workaround is to either move your project to a sane path or at the very least override your workspace with one.

scala-cli run Hello.scala
# [error]  Invalid workspace path: ~/IdeaProjects/scala-cli-tests/weird:directory
# Workspace path cannot contain a : (colon character).
# Consider moving your project to a different path.
# Alternatively, you can force your workspace with the '--workspace' option:
#     scala-cli run --workspace <alternative-workspace-path> Hello.scala

@Gedochao Gedochao added the bug Something isn't working label Mar 30, 2023
@Gedochao Gedochao changed the title Print a better error when workspace path contains : on non-Windows systems Print a better error when workspace path contains the File.pathSeparator Mar 30, 2023
@Gedochao Gedochao requested a review from tgodzik March 30, 2023 10:48
Copy link
Contributor

@lwronski lwronski left a comment

Choose a reason for hiding this comment

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

LGTM.

@Gedochao Gedochao merged commit 851a4fc into VirtusLab:main Mar 31, 2023
37 checks passed
@Gedochao Gedochao deleted the handle-workspace-colon branch March 31, 2023 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants