-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
36 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ class WindowsService { | |
throw new Error(`Service '${config.name}' already exists in '${serviceBatchPath}'.`); | ||
} | ||
|
||
const batchFileContent = this.generateConfig(config); | ||
const batchFileContent = await this.generateConfig(config); | ||
|
||
if (onlyGenerate) { | ||
return { | ||
|
@@ -127,7 +127,7 @@ class WindowsService { | |
* @param {InstallServiceOptions} options - The options used to generate the batch file. | ||
* @returns {string} The generated batch file content as a string. | ||
*/ | ||
generateConfig(options: InstallServiceOptions): string { | ||
async generateConfig(options: InstallServiceOptions): Promise<string> { | ||
const defaultPath = `%PATH%;`; | ||
const envPath = options.path ? `${defaultPath};${options.path.join(";")}` : defaultPath; | ||
const workingDirectory = options.cwd ? options.cwd : cwd(); | ||
|
@@ -144,6 +144,7 @@ class WindowsService { | |
} | ||
|
||
batchFileContent += `"deno run -A --allow-ffi --unstable https://deno.land/x/[email protected]/run.ts --serviceName ${options.name} -- ${options.cmd}\n`; | ||
await true; | ||
|
||
return batchFileContent; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters