fix(system-executors): wrong usage of getEnv in start script
This commit is contained in:
parent
73a3a2a91a
commit
bff2b804ce
2 changed files with 2 additions and 16 deletions
|
@ -50,9 +50,7 @@ export class SystemExecutors {
|
|||
};
|
||||
};
|
||||
|
||||
private ensureFilePermissions = async () => {
|
||||
const { rootFolderHost } = getEnv();
|
||||
|
||||
private ensureFilePermissions = async (rootFolderHost: string) => {
|
||||
console.log('Tipi is asking for your password to ensure file permissions are correct (performed only in runtipi folder)');
|
||||
const filesAndFolders = [
|
||||
path.join(rootFolderHost, 'apps'),
|
||||
|
@ -135,7 +133,7 @@ export class SystemExecutors {
|
|||
public start = async () => {
|
||||
const spinner = new TerminalSpinner('Starting Tipi...');
|
||||
try {
|
||||
await this.ensureFilePermissions();
|
||||
await this.ensureFilePermissions(this.rootFolder);
|
||||
|
||||
spinner.start();
|
||||
spinner.setMessage('Copying system files...');
|
||||
|
|
|
@ -7,18 +7,6 @@ import { startWorker } from './services/watcher/watcher';
|
|||
import { SystemExecutors } from './executors';
|
||||
|
||||
const main = async () => {
|
||||
// Ensure the user is running as root
|
||||
if (process.env.NODE_ENV === 'production' && (!process.getuid || process.getuid() !== 0 || !process.getgid || process.getgid() !== 0)) {
|
||||
// console.error(chalk.red('✗'), 'Tipi CLI must be run as root');
|
||||
// process.exit(1);
|
||||
}
|
||||
|
||||
// Ensure the OS is linux
|
||||
if (process.env.NODE_ENV === 'production' && process.platform !== 'linux') {
|
||||
// console.error(chalk.red('✗'), 'Tipi CLI can only be run on Linux');
|
||||
// process.exit(1);
|
||||
}
|
||||
|
||||
program.description(description).version(version);
|
||||
|
||||
program
|
||||
|
|
Loading…
Add table
Reference in a new issue