mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-05-20 05:14:44 +00:00
.
This commit is contained in:
parent
a004f0ae58
commit
fc725ba36b
7280 changed files with 19 additions and 1796407 deletions
25
node_modules/is-wsl/index.js
generated
vendored
25
node_modules/is-wsl/index.js
generated
vendored
|
@ -1,25 +0,0 @@
|
|||
'use strict';
|
||||
const os = require('os');
|
||||
const fs = require('fs');
|
||||
|
||||
const isWsl = () => {
|
||||
if (process.platform !== 'linux') {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (os.release().includes('Microsoft')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
try {
|
||||
return fs.readFileSync('/proc/version', 'utf8').includes('Microsoft');
|
||||
} catch (err) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
if (process.env.__IS_WSL_TEST__) {
|
||||
module.exports = isWsl;
|
||||
} else {
|
||||
module.exports = isWsl();
|
||||
}
|
21
node_modules/is-wsl/license
generated
vendored
21
node_modules/is-wsl/license
generated
vendored
|
@ -1,21 +0,0 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
76
node_modules/is-wsl/package.json
generated
vendored
76
node_modules/is-wsl/package.json
generated
vendored
|
@ -1,76 +0,0 @@
|
|||
{
|
||||
"_args": [
|
||||
[
|
||||
"is-wsl@1.1.0",
|
||||
"/Users/eric/repos/actions/setup-node"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "is-wsl@1.1.0",
|
||||
"_id": "is-wsl@1.1.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=",
|
||||
"_location": "/is-wsl",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "is-wsl@1.1.0",
|
||||
"name": "is-wsl",
|
||||
"escapedName": "is-wsl",
|
||||
"rawSpec": "1.1.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.1.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/node-notifier"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz",
|
||||
"_spec": "1.1.0",
|
||||
"_where": "/Users/eric/repos/actions/setup-node",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/is-wsl/issues"
|
||||
},
|
||||
"description": "Check if the process is running inside Windows Subsystem for Linux (Bash on Windows)",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"clear-require": "^2.0.0",
|
||||
"proxyquire": "^1.7.11",
|
||||
"xo": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/is-wsl#readme",
|
||||
"keywords": [
|
||||
"check",
|
||||
"wsl",
|
||||
"windows",
|
||||
"subsystem",
|
||||
"linux",
|
||||
"detect",
|
||||
"bash",
|
||||
"process",
|
||||
"console",
|
||||
"terminal",
|
||||
"is"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "is-wsl",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/is-wsl.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "1.1.0"
|
||||
}
|
28
node_modules/is-wsl/readme.md
generated
vendored
28
node_modules/is-wsl/readme.md
generated
vendored
|
@ -1,28 +0,0 @@
|
|||
# is-wsl [](https://travis-ci.org/sindresorhus/is-wsl)
|
||||
|
||||
> Check if the process is running inside [Windows Subsystem for Linux](https://msdn.microsoft.com/commandline/wsl/about) (Bash on Windows)
|
||||
|
||||
Can be useful if you need to work around unimplemented or buggy features in WSL.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save is-wsl
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const isWsl = require('is-wsl');
|
||||
|
||||
// When running inside Windows Subsystem for Linux
|
||||
console.log(isWsl);
|
||||
//=> true
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
Loading…
Add table
Add a link
Reference in a new issue