-
-
Notifications
You must be signed in to change notification settings - Fork 450
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
serverless-patched with pnpm is broken #2492
Comments
For others stumbling here with Don't use
"scripts": {
"deploy": "SERVERLESS_CLI=true serverless --debug",
},
"devDependencies": {
"serverless": "^2.72.2",
},
"pnpm": {
"patchedDependencies": {
"@serverless/[email protected]": "patches/@[email protected]"
}
} diff --git a/src/Context.js b/src/Context.js
index 4fb9da9b8a10ba8bc4ff82adab17e9605bf6d53e..ea13d974159fc17203d9dfa7dd5930a1dc29c9fb 100644
--- a/src/Context.js
+++ b/src/Context.js
@@ -153,7 +153,11 @@ class CLI {
process.stdout.write(ansiEscapes.cursorShow)
if (!this.isStatusEngineActive()) {
console.log() // eslint-disable-line
- process.exit(0)
+ if (reason === 'error') {
+ process.exit(1)
+ } else {
+ process.exit(0)
+ }
return
}
return this.statusEngineStop(reason, message)
@@ -244,6 +248,10 @@ class CLI {
this._.entity = entity
}
+ if (!process.stdout.isTTY || !!process.env.SERVERLESS_CI) {
+ return;
+ }
+
// Loading dots
if (this._.status.loadingDotCount === 0) {
this._.status.loadingDots = `.` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue Summary
When using
serverless-patched
doesn't work with pnpm.Actual behavior
Calling
serverless-patched
seems to work as the note is printed. but the Deploying logs are still present:The
findUpSync
logic finds an unpatchedserverless
instance due topnpm
'snode_modules
structure.Expected behavior
Deploying ...
logs should not be printedSteps to reproduce
pnpm
withserverless-patched
Versions
Checklist
latest
oralpha
@sls-next/serverless-component
release version, which may have already fixed your issue or implemented the feature you are trying to use. Note that the oldserverless-next.js
component and theserverless-next.js
plugin are deprecated and no longer maintained.Possible issues to address:
Note: running patched serverless binary.
insidebin/serverless-patched.ts
but add this log line to the patch@serverless+cli+1.5.3.patch
itself. It was very confusing to track down this issue because of this. Bonus: detect whether the patch is present.@serverless/cli
To be honest, the amount of work put into this workaround, it seems upstreaming is the best option unless they are hesitant to accept patches.
The text was updated successfully, but these errors were encountered: