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

fix: --exec ENOENT tinyexec args, close #62 #63

Merged
merged 2 commits into from
Dec 12, 2024

Conversation

YunYouJun
Copy link

@YunYouJun YunYouJun commented Dec 11, 2024

Description

--exec="command" will throw error ENOENT.

Caused by this commit: 780b7cc#diff-98dd85fb32fd9de446227ad9d0c91df2a4f8ec1d1436b6b294ec11413bf3a0e7R80

Linked Issues

#62

Additional context

Add exec.test.ts to test --exec.

@@ -77,9 +77,11 @@ export async function versionBump(arg: (VersionBumpOptions) | string = {}): Prom
}
else {
console.log(symbols.info, 'Executing script', operation.options.execute)
await x(operation.options.execute, [], {
const [command, ...args] = operation.options.execute.split(' ')
Copy link
Member

@antfu antfu Dec 11, 2024

Choose a reason for hiding this comment

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

Well, this is honestly tricky as this would usually need a proper parser to handle cases like -m "some space in side". It's a shame the tinyexec doesn't support the command mode. Maybe we find a library for this?

Copy link
Author

Choose a reason for hiding this comment

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

execa supports the command mode.
Are there any other recommended libraries?

Copy link
Member

Choose a reason for hiding this comment

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

I brought it upstream: tinylibs/tinyexec#42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants