@@ -23,7 +23,7 @@ import { CommandNames } from './commands/constants';
23
23
import { ImportIdentifier } from './commands/importIdentifier' ;
24
24
import { DocsBrowser } from './docsBrowser' ;
25
25
import { downloadHaskellLanguageServer } from './hlsBinaries' ;
26
- import { directoryExists , executableExists , ExtensionLogger , resolvePathPlaceHolders } from './utils' ;
26
+ import { directoryExists , executableExists , expandHomeDir , ExtensionLogger , resolvePathPlaceHolders } from './utils' ;
27
27
28
28
// Used for environment variables later on
29
29
interface IEnvVars {
@@ -171,11 +171,11 @@ async function activateServerForFolder(context: ExtensionContext, uri: Uri, fold
171
171
172
172
const logLevel = workspace . getConfiguration ( 'haskell' , uri ) . trace . server ;
173
173
const clientLogLevel = workspace . getConfiguration ( 'haskell' , uri ) . trace . client ;
174
- const logFile = workspace . getConfiguration ( 'haskell' , uri ) . logFile ;
174
+ const logFile : string = workspace . getConfiguration ( 'haskell' , uri ) . logFile ;
175
175
176
176
const outputChannel : OutputChannel = window . createOutputChannel ( langName ) ;
177
177
178
- const logFilePath = logFile ? path . resolve ( currentWorkingDir , logFile ) : undefined ;
178
+ const logFilePath = path . resolve ( currentWorkingDir , expandHomeDir ( logFile ) ) ;
179
179
const logger : Logger = new ExtensionLogger ( 'client' , clientLogLevel , outputChannel , logFilePath ) ;
180
180
if ( logFilePath ) {
181
181
logger . info ( `Writing client log to file ${ logFilePath } ` ) ;
0 commit comments