-
Notifications
You must be signed in to change notification settings - Fork 7
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
allow .env style output from resolve and add associated docs #159
Conversation
🦋 Changeset detectedLatest commit: 55874ce The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for signup-api canceled.
|
✅ Deploy Preview for dmno ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
commit: |
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.
awesome - just needs a changeset!
@@ -0,0 +1 @@ | |||
export const isSubshell = () => (process.env.BASH_SUBSHELL && process.env.BASH_SUBSHELL !== '0') || false; |
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.
simple enough! Any other notes about other things you tried / learned worth adding as comments?
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.
I think the better way is probably to verify via that the pid differs from the parent pid, but this is different across shells (zsh for example)
import { expect, test, describe } from 'vitest'; | ||
import { isSubshell } from './shell-helpers'; | ||
|
||
describe('isSubshell', () => { |
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.
hooray tests! 🥳
Adds the
env
format option for the--format
flag indmno resolve
Adds the -np or --no-prompt flag to bypass the service selection for
dmno resolve
Automatically detects if you're in a non-interactive shell (like a subshell) and also moves into non-interactive mode
For example:
pnpm exec dmno resolve --service api --format env >> .env.production
adds docs to:
dmno resolve
pagefixes #160