-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: dont override $.prefix setting defined via envs, revert `env.S…
#1261
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
Conversation
cd7d2ff to
4483443
Compare
revert: `env.SHELL` as default
4483443 to
0e5bc59
Compare
$.prefix setting defined via envs, Revert `env.S…$.prefix setting defined via envs, revert `env.S…
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.
Pull Request Overview
This PR makes prefix and postfix optional in the core API, updates default handling, and ensures existing $.prefix/$.postfix values from the environment are not overridden. Key changes include:
- Marking
prefixandpostfixas optional and removing their empty-string defaults - Updating
fullCmdto safely handle undefinedprefix/postfix - Extending the initial
$destructuring to includeprefixandpostfix
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/core.ts | Made prefix/postfix optional, updated defaults, fullCmd, and destructuring logic |
| build/core.cjs | Mirrored src/core.ts changes in compiled output |
| .size-limit.json | Bumped size limits to reflect the new build |
src/core.ts
Outdated
| useBash() | ||
| if (isString(shell)) $.shell = shell | ||
| if (isString(prefix)) $.prefix = prefix | ||
| if (isString(postfix)) $.postfix = prefix |
Copilot
AI
Jul 9, 2025
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.
This line assigns prefix to $.postfix instead of postfix. It should be $.postfix = postfix.
| if (isString(postfix)) $.postfix = prefix | |
| if (isString(postfix)) $.postfix = postfix |
build/core.cjs
Outdated
| useBash(); | ||
| if ((0, import_util.isString)(shell)) $.shell = shell; | ||
| if ((0, import_util.isString)(prefix)) $.prefix = prefix; | ||
| if ((0, import_util.isString)(postfix)) $.postfix = prefix; |
Copilot
AI
Jul 9, 2025
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.
This assignment uses prefix instead of postfix. Update to $.postfix = postfix.
| if ((0, import_util.isString)(postfix)) $.postfix = prefix; | |
| if ((0, import_util.isString)(postfix)) $.postfix = postfix; |
a5fef9d to
3820647
Compare
closes #1260
Fixes setting
$.prefixasZX_PREFIX=""env.