Skip to content

Commit

Permalink
Implement eas env:load and env:unload
Browse files Browse the repository at this point in the history
  • Loading branch information
khamilowicz committed Sep 3, 2024
1 parent fd45f05 commit 58f04bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/eas-cli/src/commands/env/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export default class EnvironmentVariableInit extends EasCommand {

await appendFile(shellConfigPath, `\n${direnvHookCmd}\n`, 'utf8');
Log.log(`Added direnv hook to ${shellConfigPath}`);
await spawnAsync(direnvInitCmd[0], direnvInitCmd[1], { stdio: 'inherit' });
await spawnAsync(...direnvInitCmd);
} else {
Log.log("Unable to determine the user's shell");
Log.log('You may need to add the direnv hook to your shell config manually.');
Expand Down Expand Up @@ -97,7 +97,7 @@ export default class EnvironmentVariableInit extends EasCommand {
return {
shellConfigPath: path.join(os.homedir(), '.config/fish/config.fish'),
direnvHookCmd: 'direnv hook fish | source',
direnvInitCmd: ['direnv', ['hook', 'fish']],
direnvInitCmd: ['eval', ['"$(direnv hook fish)"']],
};
} else {
return null;
Expand Down

0 comments on commit 58f04bb

Please sign in to comment.