File tree 2 files changed +20
-3
lines changed
2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 30
30
ghc-version : ${{ matrix.ghc }}
31
31
- run : |
32
32
mkdir -p test-workspace/bin/
33
- export GHCUP_USE_XDG_DIRS=1
34
- export XDG_BIN_HOME=$(pwd)/test-workspace/bin/.ghcup/bin
35
33
export GHCUP_INSTALL_BASE_PREFIX=$(pwd)/test-workspace/bin
36
34
echo $XDG_BIN_HOME $GHCUP_INSTALL_BASE_PREFIX
37
35
ghcup --no-verbose prefetch hls 1.4.0
Original file line number Diff line number Diff line change @@ -32,6 +32,11 @@ function getWorkspaceFile(name: string) {
32
32
return wsroot . with ( { path : path . posix . join ( wsroot . path , name ) } ) ;
33
33
}
34
34
35
+ // function getWorkspaceGhcupCacheDirectory() {
36
+ // const wsroot = getWorkspaceRoot().uri;
37
+ // return wsroot.with({ path: path.posix.join(wsroot.path, 'bin/.ghcup/cache') });
38
+ // }
39
+
35
40
async function deleteWorkspaceFiles ( pred ?: ( fileType : [ string , vscode . FileType ] ) => boolean ) {
36
41
await deleteFiles ( getWorkspaceRoot ( ) . uri , pred ) ;
37
42
}
@@ -83,7 +88,21 @@ suite('Extension Test Suite', () => {
83
88
vscode . window . showInformationMessage ( 'Start all tests.' ) ;
84
89
85
90
suiteSetup ( async ( ) => {
86
- await deleteWorkspaceFiles ( ( [ fp , _ ] ) => fp !== 'settings.json' ) ;
91
+ await deleteWorkspaceFiles ( ( [ fp , type ] ) => {
92
+ if ( type === vscode . FileType . Directory && fp === '.vscode' ) {
93
+ return false ;
94
+ }
95
+ if ( type === vscode . FileType . Directory && fp === 'bin' ) {
96
+ return false ;
97
+ }
98
+ if ( type === vscode . FileType . Directory && fp === '.ghcup' ) {
99
+ return false ;
100
+ }
101
+ if ( type === vscode . FileType . Directory && fp === 'cache' ) {
102
+ return false ;
103
+ }
104
+ return true ;
105
+ } ) ;
87
106
await getHaskellConfig ( ) . update ( 'logFile' , 'hls.log' ) ;
88
107
await getHaskellConfig ( ) . update ( 'trace.server' , 'messages' ) ;
89
108
await getHaskellConfig ( ) . update ( 'releasesDownloadStoragePath' , path . normalize ( getWorkspaceFile ( 'bin' ) . fsPath ) ) ;
You can’t perform that action at this time.
0 commit comments