feat: add command line flag for pen drive usage #192

This commit is contained in:
Johannes Millan 2019-07-03 00:33:10 +02:00
parent 6a2e05dabe
commit d9d51e6e99

View file

@ -41,6 +41,15 @@ if (IS_DEV) {
console.log('Starting in DEV Mode!!!');
}
// NOTE: needs to be executed before everything else
process.argv.forEach((val) => {
if (val && val.includes('--user-data-dir=')) {
const customUserDir = val.replace('--user-data-dir=', '').trim();
console.log('Using custom directory for user data', customUserDir);
app.setPath('userData', customUserDir);
}
});
interface MyApp extends App {
isQuiting?: boolean;
}