File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,7 @@ import path from 'path'
88const temp = require ( 'temp' ) . track ( )
99
1010describe ( "AtomPaths" , ( ) => {
11- const portableAtomHomePath = path . join ( atomPaths . getAppDirectory ( ) , '.atom' )
12- console . log ( portableAtomHomePath )
11+ const portableAtomHomePath = path . join ( atomPaths . getAppDirectory ( ) , '..' , '.atom' )
1312
1413 afterEach ( ( ) => {
1514 atomPaths . setAtomHome ( app . getPath ( 'home' ) )
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ const hasWriteAccess = (dir) => {
1717const getAppDirectory = ( ) => {
1818 switch ( process . platform ) {
1919 case 'darwin' :
20- return path . join ( process . execPath . substring ( 0 , process . execPath . indexOf ( '.app' ) ) , '..' )
20+ return process . execPath . substring ( 0 , process . execPath . indexOf ( '.app' ) + 4 )
2121 case 'linux' :
2222 case 'win32' :
2323 return path . join ( process . execPath , '..' )
@@ -27,7 +27,7 @@ const getAppDirectory = () => {
2727module . exports = {
2828 setAtomHome : ( homePath ) => {
2929 // When a read-writeable .atom folder exists above app use that
30- const portableHomePath = path . join ( getAppDirectory ( ) , '.atom' )
30+ const portableHomePath = path . join ( getAppDirectory ( ) , '..' , '. atom')
3131 if ( fs . existsSync ( portableHomePath ) ) {
3232 if ( hasWriteAccess ( portableHomePath ) ) {
3333 process . env . ATOM_HOME = portableHomePath
You can’t perform that action at this time.
0 commit comments