diff --git a/src/modes/internal.activate.ts b/src/modes/internal.activate.ts index 316ef6d6..22feded9 100644 --- a/src/modes/internal.activate.ts +++ b/src/modes/internal.activate.ts @@ -95,7 +95,7 @@ export default async function(dir: Path, { powder, ...opts }: { powder: PackageR env ${off_string} if [ "$1" != --shy ]; then - rm "${persistence}" + rm -f "${persistence}" fi unset -f _pkgx_dev_off _pkgx_should_deactivate_devenv diff --git a/src/modes/shellcode.ts b/src/modes/shellcode.ts index bbfd4aeb..df0d18bd 100644 --- a/src/modes/shellcode.ts +++ b/src/modes/shellcode.ts @@ -55,7 +55,7 @@ export default function() { ${sh} "${tmp}/shellcode/x.$$" unset foo fi - rm "${tmp}/shellcode/"?.$$ + rm -f "${tmp}/shellcode/"?.$$ else echo "pkgx: nothing to run" >&2 return 1 @@ -90,7 +90,12 @@ export default function() { dev() { if [ "$1" = 'off' ]; then - _pkgx_dev_off + if type _pkgx_dev_off >/dev/null 2>&1; then + _pkgx_dev_off + else + echo 'dev: environment not active' >&2 + return 1 + fi elif type _pkgx_dev_off >/dev/null 2>&1; then echo 'dev: environment already active' >&2 return 1