You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I verified that the issue exists in the latest pnpm release
pnpm version
No response
Which area(s) of pnpm are affected? (leave empty if unsure)
CLI
Link to the code that reproduces this issue or a replay of the bug
No response
Reproduction steps
Use the following scripts in package.json:
{
"prepublishOnly": "[ -n \"$TURBO_HASH\" ] && echo Check and build did already run as dependencies of turborepo task [$TURBO_HASH] || turbo publish:check check build",
"publish:check": "[ `pnpm config -g get @pcr:registry` != 'undefined' ] || ! echo 'Error: Missing required @pcr:registry in ~/.npmrc'",
}
Run pnpm publish --no-git-checks
Expected result: Turbo tasks run before publish Actual result: Outputs Check and build did already run as dependencies of turborepo task [$TURBO_HASH] literally, without extrapolated $TURBO_HASH
Workaround: Change the scripts in package.json:
{
"prepublishOnly": "pnpm publish:init",
"publish:init": "[ -n \"$TURBO_HASH\" ] && echo Check and build did already run as dependencies of turborepo task [$TURBO_HASH] || turbo publish:check check build",
"publish:check": "[ `pnpm config -g get @pcr:registry` != 'undefined' ] || ! echo 'Error: Missing required @pcr:registry in ~/.npmrc'",
}
Run pnpm publish --no-git-checks
Result (correct): Turbo tasks run before publish
Describe the Bug
Apparently prepublishOnly script does not extrapolate env variables in step 2 above.
The workaround is to crate another script and run it from prepublishOnly like in step 3 above.
Expected Behavior
The prepublishOnly script should extrapolate env variables and steps 1 and 2 above should work as expected.
Which Node.js version are you using?
22.5.1
Which operating systems have you used?
macOS
Windows
Linux
If your OS is a Linux based, which one it is? (Include the version if relevant)
No response
The text was updated successfully, but these errors were encountered:
Verify latest release
pnpm version
No response
Which area(s) of pnpm are affected? (leave empty if unsure)
CLI
Link to the code that reproduces this issue or a replay of the bug
No response
Reproduction steps
package.json
:pnpm publish --no-git-checks
Expected result: Turbo tasks run before publish
Actual result: Outputs
Check and build did already run as dependencies of turborepo task [$TURBO_HASH]
literally, without extrapolated$TURBO_HASH
package.json
:pnpm publish --no-git-checks
Result (correct): Turbo tasks run before publish
Describe the Bug
Apparently
prepublishOnly
script does not extrapolate env variables in step 2 above.The workaround is to crate another script and run it from
prepublishOnly
like in step 3 above.Expected Behavior
The
prepublishOnly
script should extrapolate env variables and steps 1 and 2 above should work as expected.Which Node.js version are you using?
22.5.1
Which operating systems have you used?
If your OS is a Linux based, which one it is? (Include the version if relevant)
No response
The text was updated successfully, but these errors were encountered: