mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
core: command: respect HYDRO_PROFILE
This commit is contained in:
2 files changed
+2
-2
No files matched your search
@@ -5,6 +5,7 @@ import readline from 'readline/promises';
|
||||
import cac, { CAC } from 'cac';
|
||||
import fs from 'fs-extra';
|
||||
import { Logger, size } from '@hydrooj/utils';
|
||||
import { hydroPath } from '../options';
|
||||
const argv = cac().parse();
|
||||
|
||||
const logger = new Logger('db');
|
||||
@@ -15,7 +16,6 @@ const exec = (...args: Parameters<typeof child.spawnSync>) => {
|
||||
if (res.status) throw new Error(`Error: Exited with code ${res.status}`);
|
||||
return res;
|
||||
};
|
||||
const hydroPath = path.resolve(os.homedir(), '.hydro');
|
||||
const dir = `${os.tmpdir()}/${Math.random().toString(36).substring(2)}`;
|
||||
function getUrl() {
|
||||
const dbConfig = fs.readFileSync(path.resolve(hydroPath, 'config.json'), 'utf-8');
|
||||
|
||||
@@ -8,6 +8,7 @@ import superagent from 'superagent';
|
||||
import tar from 'tar';
|
||||
import { extractZip, Logger } from '@hydrooj/utils';
|
||||
import { version } from 'hydrooj/package.json';
|
||||
import { hydroPath } from '../options';
|
||||
|
||||
const logger = new Logger('install');
|
||||
let yarnVersion = 0;
|
||||
@@ -18,7 +19,6 @@ try {
|
||||
// yarn 2 does not support global dir
|
||||
}
|
||||
|
||||
const hydroPath = path.resolve(os.homedir(), '.hydro');
|
||||
const addonDir = path.join(hydroPath, 'addons');
|
||||
|
||||
function downloadAndExtractTgz(url: string, dest: string) {
|
||||
|
||||
Reference in new issue
Block a user