Comparing version 2.0.0 to 2.1.0
11
index.js
@@ -9,4 +9,11 @@ 'use strict'; | ||
// http://stackoverflow.com/a/11995662/64949 | ||
return execa('net.exe', ['session']).then(() => true).catch(() => false); | ||
// http://stackoverflow.com/a/21295806/1641422 | ||
return execa('fsutil', ['dirty', 'query', '%systemdrive%']).then(() => true).catch(error => { | ||
if (error.code === 'ENOENT') { | ||
// http://stackoverflow.com/a/28268802 | ||
return execa('fltmc').then(() => true).catch(() => false); | ||
} | ||
return false; | ||
}); | ||
}; |
{ | ||
"name": "is-admin", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Check if the process is running as Administrator on Windows", | ||
@@ -38,3 +38,3 @@ "license": "MIT", | ||
"dependencies": { | ||
"execa": "^0.4.0" | ||
"execa": "^0.6.1" | ||
}, | ||
@@ -44,6 +44,3 @@ "devDependencies": { | ||
"xo": "*" | ||
}, | ||
"xo": { | ||
"esnext": true | ||
} | ||
} |
@@ -29,3 +29,3 @@ # is-admin | ||
Returns a Promise for a boolean indicating if the process is running as Administrator. | ||
Returns a `Promise<boolean>` indicating whether the process is running as Administrator. | ||
@@ -32,0 +32,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
2741
15
0
+ Addedcross-spawn@5.1.0(transitive)
+ Addedexeca@0.6.3(transitive)
+ Addedget-stream@3.0.0(transitive)
+ Addednpm-run-path@2.0.2(transitive)
+ Addedp-finally@1.0.0(transitive)
+ Addedpath-key@2.0.1(transitive)
+ Addedshebang-command@1.2.0(transitive)
+ Addedshebang-regex@1.0.0(transitive)
+ Addedsignal-exit@3.0.7(transitive)
- Removedcross-spawn-async@2.2.5(transitive)
- Removedexeca@0.4.0(transitive)
- Removednpm-run-path@1.0.0(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedpath-key@1.0.0(transitive)
Updatedexeca@^0.6.1