import * as fs from 'fs-extra' ; import * as path from 'path' ; returns { string } export function getWorkDirectory ( ) { const homeDir = process . env . USERPROFILE || require ( 'os' ) . homedir ( ) ; const workDir = path . join ( homeDir , '.windows-build-tools' ) ; try { fs . ensureDirSync ( workDir ) ; return workDir ; } catch ( error ) { console . log ( error ) ; } }