File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,15 +33,17 @@ jobs:
3333 - run : npm ci
3434 - run : npx tsx scripts/cleanup-github-actions.ts
3535
36- - name : Setup tmate session
37- uses : mxschmitt/action-tmate@v3
36+ # - name: Setup tmate session
37+ # uses: mxschmitt/action-tmate@v3
3838
3939 - name : Run tests (macOS - zsh login shell)
4040 if : runner.os == 'macOS'
4141 shell : zsh {0}
4242 run : |
4343 sudo chsh -s $(which zsh) $USER
4444 echo $0
45+
46+ # Clean up the residue from the bashrc file
4547 echo $ZSH_NAME $ZSH_VERSION
4648 export SHELL=/bin/zsh
4749 touch ~/.zshrc
Original file line number Diff line number Diff line change @@ -102,7 +102,19 @@ export class JenvResource extends Resource<JenvConfig> {
102102
103103 override async destroy ( ) : Promise < void > {
104104 const $ = getPty ( ) ;
105- await $ . spawn ( 'rm -rf $HOME/.jenv' ) ;
105+
106+ if ( Utils . isMacOS ( ) ) {
107+ const brewPrefix = await $ . spawnSafe ( 'brew --prefix' , { interactive : true } ) ;
108+ if ( brewPrefix . status === SpawnStatus . SUCCESS ) {
109+ const jenvPath = await $ . spawnSafe ( 'which jenv' , { interactive : true } ) ;
110+ if ( jenvPath . status === SpawnStatus . SUCCESS && jenvPath . data . trim ( ) . startsWith ( brewPrefix . data . trim ( ) ) ) {
111+ await $ . spawn ( 'brew uninstall jenv' , { interactive : true } ) ;
112+ }
113+ }
114+ await $ . spawnSafe ( 'rm -rf $HOME/.jenv' ) ;
115+ } else {
116+ await $ . spawnSafe ( 'rm -rf $HOME/.jenv' ) ;
117+ }
106118
107119 await FileUtils . removeLineFromStartupFile ( 'export PATH="$HOME/.jenv/bin:$PATH"' )
108120 await FileUtils . removeLineFromStartupFile ( 'eval "$(jenv init -)"' )
You can’t perform that action at this time.
0 commit comments