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

Added filters for global envs #4596

Closed
wants to merge 1,284 commits into from
Closed

Added filters for global envs #4596

wants to merge 1,284 commits into from

Conversation

inerc
Copy link

@inerc inerc commented Feb 3, 2020

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? no
License MIT
Doc PR pm2-hive/pm2-hive.github.io#179

vmarchaud and others added 30 commits March 5, 2019 14:47
The pm2 unstartup will always failed in macos. Because the pm2.*.plist will never been deleted.

commands = [
        'launchctl remove ' + launchd_service_name + ' || true',
        'rm ' + destination
      ];
launchctl remove always return no-zero value, so rm in the next will never been executed.
Fix help message of describe/env command
fix pm2 unstartup fialed in macos
lib/Common.js Outdated Show resolved Hide resolved
Copy link
Author

@inerc inerc left a comment

Choose a reason for hiding this comment

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

fixed comments

lib/Common.js Outdated Show resolved Hide resolved
@nlopin
Copy link

nlopin commented Mar 3, 2020

Thank you for awesome work! Is it going to be merged any time soon?

The filter_env is already in the documentation, but it doesn't work

@@ -42,6 +42,7 @@ commander.version(pkg.version)
.option('--env <environment_name>', 'specify which set of environment variables from ecosystem file must be injected')
.option('-a --update-env', 'force an update of the environment with restart/reload (-a <=> apply)')
.option('-f --force', 'force actions')
.option('--filter_env [envs]', 'filter outgoing global values by prefix', function(v, m) { m.push(v); return m;}, [])
Copy link

Choose a reason for hiding this comment

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

We use includes in the filterEnv function and it checks if the string contains passed substring. So we filter outgoing values by the presence of the provided value in the key.

Copy link
Author

Choose a reason for hiding this comment

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

I hope that it will be in the release soon....

Copy link

Choose a reason for hiding this comment

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

@inerc I hope so, my pm2 crashes because of the env variables overflow. Can you change the description above? What about: 'filter out outgoing global values that contain provided strings'?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, it will be better. I have made changes.

@CLAassistant
Copy link

CLA assistant check
All committers have signed the CLA.

@Unitech Unitech changed the base branch from master to development April 12, 2020 14:22
Unitech added a commit that referenced this pull request Apr 12, 2020
@Unitech
Copy link
Owner

Unitech commented Apr 12, 2020

thanks for the work.
I reworked the PR to fix some issues (allow boolean and string) and add some tests:
c93f011

@Unitech Unitech closed this Apr 12, 2020
Unitech added a commit that referenced this pull request Apr 12, 2020
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.

None yet