Current Folder
This commit is contained in:
1 parent
8b3382289b
commit
cfcada880d
4379 files changed
No files matched your search
+25
@@ -0,0 +1,25 @@
|
||||
'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();
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"_from": "is-wsl@^1.1.0",
|
||||
"_id": "is-wsl@1.1.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=",
|
||||
"_location": "/is-wsl",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"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": [
|
||||
"/open"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz",
|
||||
"_shasum": "1f16e4aa22b04d1336b66188a66af3c600c3a66d",
|
||||
"_spec": "is-wsl@^1.1.0",
|
||||
"_where": "C:\\Users\\Luis\\source\\repos\\AAMasters\\BackendServers\\node_modules\\open",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/is-wsl/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"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"
|
||||
}
|
||||
Reference in new issue
Block a user