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

Expand ~ before quoting notebook_dir #890

Closed
wants to merge 3 commits into from

Conversation

parente
Copy link
Member

@parente parente commented Dec 1, 2016

closes #878

@parente
Copy link
Member Author

parente commented Dec 1, 2016

Don't merge quite yet. Testing a bit.

@parente
Copy link
Member Author

parente commented Dec 1, 2016

Nope. Expands too early for sudospawner.

@parente parente closed this Dec 1, 2016
@parente parente reopened this Dec 1, 2016
@parente
Copy link
Member Author

parente commented Dec 1, 2016

Restoring the original, unquoted --notebook_dir=%s template in spawner.py fixes the ~ expansion bug. It's questionable whether this is trading one fix for other problems, however.

@minrk
Copy link
Member

minrk commented Dec 1, 2016

I think this is a bug for the single-user server to fix (by calling expanduser), and not to change here. The reason to not change it here is that the quotes were added to deal with an issue in traitlets CLI parsing, to ensure the result is a string (i.e. adding quotes shouldn't change the value).

I also don't think the shell expansion will work for Spawners that launch without instantiating a shell (shell=True for Popen), because raw command-launching doesn't expand ~ (I think).

@minrk minrk changed the title Fix 878: Expand ~ before quoting notebook_dir Expand ~ before quoting notebook_dir Dec 1, 2016
@parente parente closed this Dec 2, 2016
@willingc
Copy link
Contributor

willingc commented Dec 2, 2016

Thanks @parente and @minrk :D

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.

notebooks_dir ~ expands incorrectly
3 participants