How to use the home function from osenv
Find comprehensive JavaScript osenv.home code examples handpicked from public code repositorys.
GitHub: legoflow/legoflow
71 72 73 74 75 76 77 78 79 80
else stableFamily = stableFamily.major + '.' + stableFamily.minor var defaults var temp = osenv.tmpdir() var home = osenv.home() var uidOrPid = process.getuid ? process.getuid() : process.pid if (home) process.env.HOME = home
49
518
38
GitHub: nicolaspanel/node-svm
18 19 20 21 22 23 24 25 26 27
}; // Guess some needed properties based on the user OS var user = (osenv.user() || generateFakeUser()).replace(/\\/g, '-'); var tmp = path.join(os.tmpdir ? os.tmpdir() : os.tmpDir(), user); var home = osenv.home(); var base; // Fallbacks for windows if (process.platform === 'win32') {
47
295
16
GitHub: Mondego/pyreco
39 40 41 42 43 44 45 46 47 48
## osenv.tmpdir() The place where temporary files should be created. ## osenv.home() No place like it. ## osenv.path()
19
22
13
13 14 15 16 17 18 19 20 21 22
var prog = gyp() var completed = false prog.parseArgv(process.argv) prog.devDir = prog.opts.devdir var homeDir = osenv.home() if (prog.devDir) { prog.devDir = prog.devDir.replace(/^~/, homeDir) } else if (homeDir) { prog.devDir = path.resolve(homeDir, '.node-gyp')
7
8
3
18 19 20 21 22 23 24 25 26 27
We require this here instead of at the top of the file so that on the web platform, it doesn't try to do any detection (and fail, because we are not shimming process). */ const homePath = osenv.home(); /* If the user doesn't have a Documents folder, check for "My Documents" instead (thanks Windows).
240
0
2
osenv.home is the most popular function in osenv (163 examples)