diff options
| author | Joel Kronqvist <joel.h.kronqvist@gmail.com> | 2022-03-05 19:02:27 +0200 | 
|---|---|---|
| committer | Joel Kronqvist <joel.h.kronqvist@gmail.com> | 2022-03-05 19:02:27 +0200 | 
| commit | 5d309ff52cd399a6b71968a6b9a70c8ac0b98981 (patch) | |
| tree | 360f7eb50f956e2367ef38fa1fc6ac7ac5258042 /node_modules/resolve/bin | |
| parent | b500a50f1b97d93c98b36ed9a980f8188d648147 (diff) | |
| download | LYLLRuoka-5d309ff52cd399a6b71968a6b9a70c8ac0b98981.tar.gz LYLLRuoka-5d309ff52cd399a6b71968a6b9a70c8ac0b98981.zip  | |
Added node_modules for the updating to work properly.
Diffstat (limited to 'node_modules/resolve/bin')
| -rwxr-xr-x | node_modules/resolve/bin/resolve | 50 | 
1 files changed, 50 insertions, 0 deletions
diff --git a/node_modules/resolve/bin/resolve b/node_modules/resolve/bin/resolve new file mode 100755 index 0000000..5ee329a --- /dev/null +++ b/node_modules/resolve/bin/resolve @@ -0,0 +1,50 @@ +#!/usr/bin/env node + +'use strict'; + +var path = require('path'); +var fs = require('fs'); + +if ( +    String(process.env.npm_lifecycle_script).slice(0, 8) !== 'resolve ' +    && ( +        !process.argv +        || process.argv.length < 2 +        || (process.argv[1] !== __filename && fs.statSync(process.argv[1]).ino !== fs.statSync(__filename).ino) +        || (process.env._ && path.resolve(process.env._) !== __filename) +    ) +) { +    console.error('Error: `resolve` must be run directly as an executable'); +    process.exit(1); +} + +var supportsPreserveSymlinkFlag = require('supports-preserve-symlinks-flag'); + +var preserveSymlinks = false; +for (var i = 2; i < process.argv.length; i += 1) { +    if (process.argv[i].slice(0, 2) === '--') { +        if (supportsPreserveSymlinkFlag && process.argv[i] === '--preserve-symlinks') { +            preserveSymlinks = true; +        } else if (process.argv[i].length > 2) { +            console.error('Unknown argument ' + process.argv[i].replace(/[=].*$/, '')); +            process.exit(2); +        } +        process.argv.splice(i, 1); +        i -= 1; +        if (process.argv[i] === '--') { break; } // eslint-disable-line no-restricted-syntax +    } +} + +if (process.argv.length < 3) { +    console.error('Error: `resolve` expects a specifier'); +    process.exit(2); +} + +var resolve = require('../'); + +var result = resolve.sync(process.argv[2], { +    basedir: process.cwd(), +    preserveSymlinks: preserveSymlinks +}); + +console.log(result);  | 
