fix(system-executors): wrong usage of getEnv in start script

This commit is contained in:
Nicolas Meienberger 2023-08-22 21:14:32 +02:00 committed by Nicolas Meienberger
parent 021b088c41
commit 24c4d0f8af
2 changed files with 2 additions and 16 deletions

View file

@ -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...');

View file

@ -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