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

Passing paths as ARGS on Windows #40

Open
SteffenPL opened this issue Aug 31, 2021 · 3 comments
Open

Passing paths as ARGS on Windows #40

SteffenPL opened this issue Aug 31, 2021 · 3 comments

Comments

@SteffenPL
Copy link

SteffenPL commented Aug 31, 2021

The following script doesn't work on my computer

# script.jl
println(ARGS)
julia --project --startup-file=no -e "using DaemonMode; runargs()" .\script.jl "D:\w"
PAUSE

The error message is

ERROR: ERROR: MethodError: no method matching (::Colon)(::Int64, ::Nothing)

Whereas this is fine

julia --project .\script.jl "D:\w"
PAUSE

It seems that DaemonMode tries to process the ARGS and has problems with the windows path delimiters ''?

@SteffenPL
Copy link
Author

As a workaround, one could use

julia --project=. --startup-file=no -e "using DaemonMode; ARGS .= replace.(ARGS, '\\' => '/'); runargs()" .\scripts\show_video.jl "D:\w"

Which is of course not really a good solution.

@dmolina
Copy link
Owner

dmolina commented Sep 1, 2021

Thank you for your issue. I have been checking it, and the problem is the "\" in the PATH, because when it is sent from the client to the server the "\w" is updated to "\w", giving that error.
I will try to fix it in a few days.

@SteffenPL
Copy link
Author

Hi @dmolina, thanks for the quick reply.

I also noticed also that spaces in paths are also tricky to pass. It seems that during the socket communication those also get split into different arguments, independent of quotes.

(Anyway, both things are easy to work around so far.)

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

No branches or pull requests

2 participants