mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-06-15 00:11:11 +00:00
.
This commit is contained in:
parent
9fff29ba6c
commit
00c3b50fca
7278 changed files with 0 additions and 1778943 deletions
node_modules/is-wsl
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();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue