Skip to content

Fix issues with @syntax - #1581

Merged
Travis Prescott (tjprescott) merged 2 commits into
Azure:masterfrom
tjprescott:ExpandUserFix
Dec 15, 2016
Merged

Fix issues with @syntax#1581
Travis Prescott (tjprescott) merged 2 commits into
Azure:masterfrom
tjprescott:ExpandUserFix

Conversation

@tjprescott

@tjprescott Travis Prescott (tjprescott) commented Dec 15, 2016

Copy link
Copy Markdown
Member

Fixes #1109. Expand user when using @~/path syntax
Fixes #1577. Allows use of '@' as a value (for DNS commands for example)

@derekbekoe

Copy link
Copy Markdown
Member

Should get Johan Stenberg (ex-msft) (@johanste) to take a look also as I think sometimes the shell will expand ~.

@tjprescott Travis Prescott (tjprescott) changed the title Expand user when using @~/path syntax Fix issues with @syntax Dec 15, 2016
@tjprescott

Copy link
Copy Markdown
Member Author

Derek Bekoe (@derekbekoe) from the Python documentation:

On Unix and Windows, return the argument with an initial component of ~ or ~user replaced by that user‘s home directory.
...
If the expansion fails or if the path does not begin with a tilde, the path is returned unchanged.

So if the shell does the expansion first, then there's no ~ in the path when this code get there and it is unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants