mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-24 14:06:44 -06:00
Remove is-root dependencies (#7660)
This commit is contained in:
parent
e677540fd6
commit
ab54e147f2
4 changed files with 5 additions and 14 deletions
|
@ -153,7 +153,6 @@
|
|||
"http-signature": "1.3.5",
|
||||
"idb-keyval": "5.1.3",
|
||||
"insert-text-at-cursor": "0.3.0",
|
||||
"is-root": "2.1.0",
|
||||
"is-svg": "4.3.1",
|
||||
"js-yaml": "4.1.0",
|
||||
"jsdom": "16.7.0",
|
||||
|
|
7
src/@types/is-root.d.ts
vendored
7
src/@types/is-root.d.ts
vendored
|
@ -1,7 +0,0 @@
|
|||
declare module 'is-root' {
|
||||
function isRoot(): boolean;
|
||||
|
||||
namespace isRoot {} // Hack
|
||||
|
||||
export = isRoot;
|
||||
}
|
|
@ -2,7 +2,6 @@ import * as os from 'os';
|
|||
import * as cluster from 'cluster';
|
||||
import * as chalk from 'chalk';
|
||||
import * as portscanner from 'portscanner';
|
||||
import * as isRoot from 'is-root';
|
||||
import { getConnection } from 'typeorm';
|
||||
|
||||
import Logger from '../services/logger';
|
||||
|
@ -39,6 +38,11 @@ function greet() {
|
|||
bootLogger.info(`Misskey v${meta.version}`, null, true);
|
||||
}
|
||||
|
||||
function isRoot() {
|
||||
// maybe process.getuid will be undefined under not POSIX environment (e.g. Windows)
|
||||
return process.getuid != null && process.getuid() === 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Init master process
|
||||
*/
|
||||
|
|
|
@ -6383,11 +6383,6 @@ is-resolvable@^1.1.0:
|
|||
resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88"
|
||||
integrity sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==
|
||||
|
||||
is-root@2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/is-root/-/is-root-2.1.0.tgz#809e18129cf1129644302a4f8544035d51984a9c"
|
||||
integrity sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg==
|
||||
|
||||
is-stream@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3"
|
||||
|
|
Loading…
Reference in a new issue