Fix manifest

This commit is contained in:
Daniel Flanagan 2022-02-12 02:12:02 -06:00
parent cd2954d7ca
commit 65c69d58d4
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
2 changed files with 5 additions and 3 deletions

View file

@ -2,7 +2,7 @@ _version: '20220212062110'
plugins: plugins:
echo: echo:
remote: 'https://git.lyte.dev/lytedev/echo.git' remote: 'https://git.lyte.dev/lytedev/echo-cli-plugin'
run: '{plugin_dir}/echo.sh' run: '{plugin_dir}/echo.sh'
# this is the default installCommand, so we don't really need to specify it # this is the default installCommand, so we don't really need to specify it
installCommand: ['git', 'clone', '{remote}', '{plugin_dir}'] installCommand: ['git', 'clone', '{remote}', '{plugin_dir}']
@ -14,5 +14,5 @@ plugins:
# postInstallCommand: # postInstallCommand:
shutup: shutup:
remote: 'https://git.lyte.dev/lytedev/shutup-cli-plugin.git' remote: 'https://git.lyte.dev/lytedev/shutup-cli-plugin'
run: '{plugin_dir}/shutup.sh' run: '{plugin_dir}/shutup.sh'

View file

@ -47,12 +47,14 @@ async function installPlugin(pluginName: string) {
console.error(`plugin ${pluginName} has no entry`) console.error(`plugin ${pluginName} has no entry`)
Deno.exit(1) Deno.exit(1)
} }
const cmd = pluginManifestData.installCommand || ["git", "clone", pluginManifestData.remote, pluginName].map(segment => const cmd = (pluginManifestData.installCommand || ["git", "clone", pluginManifestData.remote, pluginName]).map((segment: string) =>
segment segment
.replace('{remote}', pluginManifestData.remote) .replace('{remote}', pluginManifestData.remote)
.replace('{plugin_dir}', path.join(PLUGINS_DIR, pluginName)) .replace('{plugin_dir}', path.join(PLUGINS_DIR, pluginName))
) )
console.debug(cmd)
const installCommand = Deno.run({ const installCommand = Deno.run({
stdout: "piped", stdout: "piped",
stderr: "piped", stderr: "piped",