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

Consider being able to spawn the executable or script at a PathRef #145

Closed
dsherret opened this issue May 30, 2023 · 1 comment
Closed
Labels
wontfix This will not be worked on

Comments

@dsherret
Copy link
Owner

It would be nice to be able to spawn an executable or script with shebang at a PathRef like so:

const ciScript = $.path("./.github/workflows/ci.generate.ts");
await ciScript.run();
@dsherret dsherret added the wontfix This will not be worked on label May 30, 2023
@dsherret
Copy link
Owner Author

dsherret commented May 30, 2023

Not going to do this. First of all, run() is not a good name because it returns back a CommandBuilder, which someone could then call spawn() on, which is awkward. Most importantly though, people would want to be able to provide arguments to this and escaping them could get tricky. So for that reason, I recommend passing the PathRef directly to a $ like so:

const ciScript = $.path("./.github/workflows/ci.generate.ts");
await $`${ciScript}`;

This works today.

@dsherret dsherret closed this as not planned Won't fix, can't repro, duplicate, stale May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant