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

Unable to use util.exec in preflight on Windows #6915

Open
eladb opened this issue Jul 16, 2024 · 2 comments · Fixed by #7019
Open

Unable to use util.exec in preflight on Windows #6915

eladb opened this issue Jul 16, 2024 · 2 comments · Fixed by #7019
Assignees
Labels
🐛 bug Something isn't working

Comments

@eladb
Copy link
Contributor

eladb commented Jul 16, 2024

I tried this:

bring util;

let x = util.exec("ls", []);
log(x.stdout);

This happened:

undefined

I expected this:

No response

Is there a workaround?

No response

Anything else?

No response

Wing Version

No response

Node.js Version

No response

Platform(s)

No response

Community Notes

  • Please vote by adding a 👍 reaction to the issue to help us prioritize.
  • If you are interested to work on this issue, please leave a comment.
@eladb eladb added the 🐛 bug Something isn't working label Jul 16, 2024
@tsuf239 tsuf239 self-assigned this Aug 14, 2024
@mergify mergify bot closed this as completed in #7019 Aug 22, 2024
@mergify mergify bot closed this as completed in 9f49b16 Aug 22, 2024
@monadabot
Copy link
Contributor

Congrats! 🚀 This was released in Wing 0.83.1.

@Chriscbr Chriscbr reopened this Oct 10, 2024
@Chriscbr
Copy link
Contributor

It looks like continues to error on Windows machines - see this build error (https://github.com/winglang/wing/actions/runs/11226171454/job/31329344016):

 × src/test_corpus/doc_examples/35-exec-processes.md_example_1/main.w.test.ts > wing test -t sim 1710ms
   → Error: Program not found: spawnSync bash ENOENT
   --> main.w:14:15
   | let output3 = util.exec("bash", ["--norc", "--noprofile", "-c", "echo $WING_TARGET $ENV_VAR"], { inheritEnv: true });
   | 
   | // exec with current working directory
14 | let output4 = util.exec("bash", ["--norc", "--noprofile", "-c", "echo Hello"], { cwd: "/tmp" });
   |               ^
at D:/a/wing/wing/tests/doc_examples/valid/35-exec-processes.md_example_1/main.w:14:15
Tests 1 failed (1)
Snapshots 1 skipped
Test Files 1 failed (1)
Duration 0m0.98s

@Chriscbr Chriscbr changed the title unable to use util.exec in preflight Unable to use util.exec in preflight on Windows Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
Status: 🤝 Backlog - handoff to owners
Development

Successfully merging a pull request may close this issue.

4 participants