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 <michael_dawson@ca.ibm.com>
    Reviewed-By: Michal Zasso <targos@protonmail.com>
    Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
    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 <riclau@uk.ibm.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    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 <jasnell@gmail.com>
    Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
    Reviewed-By: Refael Ackermann <refack@gmail.com>
    Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
    Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
    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 <refack@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
    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 <cjihrig@gmail.com>
    Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
    Reviewed-By: Refael Ackermann <refack@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
    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 <cjihrig@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Michaël Zasso <targos@protonmail.com>
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    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 <luigipinca@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Sam Roberts <vieuxtech@gmail.com>/
    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 <cjihrig@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    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