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
Remove duplicate exe name with zig run on Windows #2665
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering https://github.com/ziglang/zig/blob/06e7533b29b596a55de75735e5fa8c0aaf94b9b8/std/child_process.zig#L628 which comes from https://github.com/ziglang/zig/blob/06e7533b29b596a55de75735e5fa8c0aaf94b9b8/std/child_process.zig#L524
and extracts self.argv[0]
and looking at https://docs.microsoft.com/en-us/windows/desktop/api/processthreadsapi/nf-processthreadsapi-createprocessa
LGTM
06e7533
to
17ca796
Compare
Why did you force push? You didn't change anything. |
rebase |
Seeing this same error in multiple pull requests:
|
That was most likely caused by the most recent commit 80fa871 |
Thanks for the info. Hopefully will get fixed soon? |
Fix here: #2666 |
acec409
to
5bba981
Compare
I was mistaken. It looks like CreateProcess does expect the executable to be apart of the I've updated the PR to fix this problem in |
5bba981
to
c7d969a
Compare
95a1d98
to
f69568c
Compare
src/main.cpp
Outdated
@@ -1160,7 +1160,8 @@ int main(int argc, char **argv) { | |||
|
|||
args.pop(); | |||
Termination term; | |||
os_spawn_process(exec_path, args, &term); | |||
// use NULL for exe, it's already included in args |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about making the API in os.cpp not even have the exe parameter? It would require the first arg to be the exe. That's what we ended up doing in the zig standard library and I think it's been a reasonable abstraction. That's how I was planning to fix this issue in the stage1 compiler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds reasonable. I'll see if I can update the PR tonight.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the PR, let me know if you'd like any more changes.
6f4db25
to
2977c3e
Compare
2977c3e
to
52083c5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thanks for the new API thing
Fix issue #2686