File tree Expand file tree Collapse file tree 1 file changed +8
-12
lines changed
Expand file tree Collapse file tree 1 file changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -71,10 +71,10 @@ for (const envln of env.trim().split("\n")) {
7171
7272 const [ key ] = envln . split ( "=" , 2 ) ;
7373 undo += ` if [ \\"$${ key } \\" ]; then
74- export ${ key } =\\"$${ key } \\"
75- else
76- unset ${ key }
77- fi\n` ;
74+ export ${ key } =\\"$${ key } \\"
75+ else
76+ unset ${ key }
77+ fi\n` ;
7878}
7979
8080const dir = Deno . cwd ( ) ;
@@ -84,14 +84,10 @@ const bye_bye_msg = pkgspecs.map((pkgspec) => `-${pkgspec.slice(1)}`).join(" ");
8484console . log ( `
8585eval "_pkgx_dev_try_bye() {
8686 suffix=\\"\\\${PWD#\\"${ dir } \\"}\\"
87- if test \\"\\$PWD\\" != \\"${ dir } $suffix\\"; then
88- ${ undo . trim ( ) }
89- unset -f _pkgx_dev_try_bye
90- echo -e \\"\\033[31m${ bye_bye_msg } \\033[0m\\" >&2
91- return 0
92- else
93- return 1
94- fi
87+ [ \\"\\$PWD\\" = \\"${ dir } $suffix\\" ] && return 1
88+ echo -e \\"\\033[31m${ bye_bye_msg } \\033[0m\\" >&2
89+ ${ undo . trim ( ) }
90+ unset -f _pkgx_dev_try_bye
9591}"
9692
9793set -a
You can’t perform that action at this time.
0 commit comments