Archived
Apparently runElevated is not needed
This commit is contained in:
+3
-2
@@ -30,6 +30,7 @@ export class NetBirdClient {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Deprecated???
|
||||||
runElevated(args: string[]): Promise<Omit<CommandResult, 'code'>> {
|
runElevated(args: string[]): Promise<Omit<CommandResult, 'code'>> {
|
||||||
const quotedExe = this.executablePath.replace(/'/g, "''");
|
const quotedExe = this.executablePath.replace(/'/g, "''");
|
||||||
const quotedArgs = args.map(arg => `'${String(arg).replace(/'/g, "''")}'`).join(',');
|
const quotedArgs = args.map(arg => `'${String(arg).replace(/'/g, "''")}'`).join(',');
|
||||||
@@ -67,7 +68,7 @@ export class NetBirdClient {
|
|||||||
|
|
||||||
if (status.ok) return true;
|
if (status.ok) return true;
|
||||||
|
|
||||||
await this.runElevated([
|
await this.run([
|
||||||
'service',
|
'service',
|
||||||
'install',
|
'install',
|
||||||
'--management-url',
|
'--management-url',
|
||||||
@@ -78,7 +79,7 @@ export class NetBirdClient {
|
|||||||
'info'
|
'info'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
await this.runElevated(['service', 'start']);
|
await this.run(['service', 'start']);
|
||||||
|
|
||||||
for (let index = 0; index < 20; index++) {
|
for (let index = 0; index < 20; index++) {
|
||||||
const check = await this.status({ timeout: 8000 });
|
const check = await this.status({ timeout: 8000 });
|
||||||
|
|||||||
Reference in New Issue
Block a user