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

(v6.x backport) src: allow CLI args in env with NODE_OPTIONS #12677

Closed

Commits on Oct 10, 2017

  1. process: add --redirect-warnings command line argument

    The --redirect-warnings command line argument allows process warnings
    to be written to a specified file rather than printed to stderr.
    
    Also adds an equivalent NODE_REDIRECT_WARNINGS environment variable.
    
    If the specified file cannot be opened or written to for any reason,
    the argument is ignored and the warning is printed to stderr.
    
    If the file already exists, it will be appended to.
    
    PR-URL: nodejs#10116
    Reviewed-By: Michael Dawson <[email protected]>
    Reviewed-By: Michal Zasso <[email protected]>
    Reviewed-By: Fedor Indutny <[email protected]>
    jasnell authored and sam-github committed Oct 10, 2017
    Configuration menu
    Copy the full SHA
    bc89407 View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2017

  1. src: use SafeGetenv() for NODE_REDIRECT_WARNINGS

    Mutations of the environment can invalidate pointers to environment
    variables, so make `secure_getenv()` copy them out instead of returning
    pointers.
    
    This is the part of nodejs#11051 that
    applies to be11fb4.
    This part wasn't backported to 6.x when nodejs#11051 was backported
    because the semver-minor introduction
    of NODE_REDIRECT_WARNINGS hadn't been backported yet. Now that the
    env var is backported, this last bit of nodejs#11051 is needed.
    sam-github committed Oct 11, 2017
    Configuration menu
    Copy the full SHA
    0f26391 View commit details
    Browse the repository at this point in the history
  2. src: use a std::vector for preload_modules

    A dynamically allocated array was being used, simplify the memory
    management by using std::vector.
    
    PR-URL: nodejs#12241
    Reviewed-By: Richard Lau <[email protected]>
    Reviewed-By: James M Snell <[email protected]>
    Reviewed-By: Daniel Bevenius <[email protected]>
    Reviewed-By: Colin Ihrig <[email protected]>
    Reviewed-By: Anna Henningsen <[email protected]>
    sam-github committed Oct 11, 2017
    Configuration menu
    Copy the full SHA
    f83ccb4 View commit details
    Browse the repository at this point in the history
  3. src: allow CLI args in env with NODE_OPTIONS

    Not all CLI options are supported, those that are problematic from a
    security or implementation point of view are disallowed, as are ones
    that are inappropriate (for example, -e, -p, --i), or that only make
    sense when changed with code changes (such as options that change the
    javascript syntax or add new APIs).
    
    PR-URL: nodejs#12028
    Reviewed-By: James M Snell <[email protected]>
    Reviewed-By: Michael Dawson <[email protected]>
    Reviewed-By: Refael Ackermann <[email protected]>
    Reviewed-By: Gibson Fahnestock <[email protected]>
    Reviewed-By: Bradley Farias <[email protected]>
    sam-github committed Oct 11, 2017
    Configuration menu
    Copy the full SHA
    6b47fdc View commit details
    Browse the repository at this point in the history
  4. src: whitelist new options for NODE_OPTIONS

    Add --debug-*, --napi-modules
    
    Remove --prof-process, like -p and -e, it causes node to do something
    other than run node js scripts.
    
    PR-URL: nodejs#13002
    Reviewed-By: Refael Ackermann <[email protected]>
    Reviewed-By: James M Snell <[email protected]>
    Reviewed-By: Colin Ihrig <[email protected]>
    Reviewed-By: Michael Dawson <[email protected]>
    sam-github committed Oct 11, 2017
    Configuration menu
    Copy the full SHA
    d6a584b View commit details
    Browse the repository at this point in the history
  5. src: allow --tls-cipher-list in NODE_OPTIONS

    PR-URL: nodejs#13172
    Reviewed-By: Colin Ihrig <[email protected]>
    Reviewed-By: Michael Dawson <[email protected]>
    Reviewed-By: Refael Ackermann <[email protected]>
    Reviewed-By: James M Snell <[email protected]>
    Reviewed-By: Gibson Fahnestock <[email protected]>
    sam-github committed Oct 11, 2017
    Configuration menu
    Copy the full SHA
    1c58992 View commit details
    Browse the repository at this point in the history
  6. test: chdir before running test-cli-node-options

    When test-cli-node-options is run it uses the --trace-events-enabled
    option which generates a file named node_trace.1.log. This commit
    changes the working directory to the test tmp directory to avoid this
    file being created in the project root.
    
    PR-URL: nodejs#12660
    Reviewed-By: Colin Ihrig <[email protected]>
    Reviewed-By: James M Snell <[email protected]>
    Reviewed-By: Michaël Zasso <[email protected]>
    Reviewed-By: Rich Trott <[email protected]>
    danbev authored and sam-github committed Oct 11, 2017
    Configuration menu
    Copy the full SHA
    bc65262 View commit details
    Browse the repository at this point in the history
  7. test: add hasCrypto check to test-cli-node-options

    Currently when configure --without-ssl the test will throw the following
    error:
    bad option: --use-openssl-ca
    
    This commit checks if crypto was enabled and skips the crypto related
    tests if that is the case.
    
    PR-URL: nodejs#12692
    Reviewed-By: Luigi Pinca <[email protected]>
    Reviewed-By: Colin Ihrig <[email protected]>
    Reviewed-By: James M Snell <[email protected]>
    Reviewed-By: Sam Roberts <[email protected]>/
    danbev authored and sam-github committed Oct 11, 2017
    Configuration menu
    Copy the full SHA
    3a6dcdf View commit details
    Browse the repository at this point in the history
  8. src: --abort-on-uncaught-exception in NODE_OPTIONS

    Allow --abort-on-uncaught-exception in NODE_OPTIONS, its useful to
    enable for post-mortem debugging.
    
    PR-URL: nodejs#13932
    Reviewed-By: Colin Ihrig <[email protected]>
    Reviewed-By: James M Snell <[email protected]>
    sam-github committed Oct 11, 2017
    Configuration menu
    Copy the full SHA
    6e70c5c View commit details
    Browse the repository at this point in the history