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

use ShellExecuteW rather than cmd for edit function on Windows #20571

Merged
merged 2 commits into from
Feb 14, 2017

Conversation

stevengj
Copy link
Member

Closes #20364. Updated version of #20478, and on JuliaLang so that buildbot can be used. Supersedes #20479.

@stevengj
Copy link
Member Author

@tkelman, how do I get a Windows binary for this branch from the buildbot?

@tkelman
Copy link
Contributor

tkelman commented Feb 11, 2017

@stevengj
Copy link
Member Author

Okay, I tried out @edit for this binary on Win64, and it works.

@@ -51,10 +51,7 @@ function edit(path::AbstractString, line::Integer=0)
cmd = line != 0 ? `$command $path:$line` : `$command $path`
elseif startswith(name, "notepad++")
cmd = line != 0 ? `$command $path -n$line` : `$command $path`
elseif is_windows() && (name == "start" || name == "open")
cmd = `cmd /c start /b $path`
line_unsupported = true
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see why this is redundant? shouldn't you still get the line number warning?

Copy link
Member Author

@stevengj stevengj Feb 12, 2017

Choose a reason for hiding this comment

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

line_unsupported = true is set in the else clause, so you still get the line-number warning.

@stevengj
Copy link
Member Author

Will merge in a day or two if there are no objections.

@stevengj stevengj merged commit 2ecc215 into master Feb 14, 2017
@stevengj stevengj deleted the windowsedit branch February 14, 2017 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
system:windows Affects only Windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants