run commands with sudo
This commit is contained in:
@@ -5,11 +5,11 @@ import { logger } from "./logger";
|
||||
|
||||
export class EfiBootMgrService {
|
||||
async reboot() {
|
||||
await $`reboot`;
|
||||
await $`sudo /usr/sbin/reboot`;
|
||||
}
|
||||
|
||||
async setNextBoot(bootNum: number) {
|
||||
await $`efibootmgr -n ${bootNum}`;
|
||||
await $`sudo /usr/bin/efibootmgr -n ${bootNum}`;
|
||||
}
|
||||
|
||||
parseEfiBootMgrOutput(output: string): z.output<typeof BootEntries> {
|
||||
@@ -83,7 +83,7 @@ export class EfiBootMgrService {
|
||||
}
|
||||
|
||||
async listBootEntries(): Promise<z.output<typeof BootEntries>> {
|
||||
const output = await $`efibootmgr`.text();
|
||||
const output = await $`sudo /usr/bin/efibootmgr`.text();
|
||||
|
||||
logger.info(output);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user