Atom made portable but not apm


#1

I have run the atom --portable and also tried manually moving the .atom folder to the atom folder.
Atom runs perfectly as a portable version, however, apm doesn’t.
Whenever I try to download a package, apm creates a folder in the USER folder.
I’ve run apm config list and I can see all default directories point to USER

K:\Program Files\Atom\Atom x64\resources\app\apm\bin>apm config list
; cli configs
globalconfig = "C:\Users\jhoward\.atom\.apm\.apmrc"
user-agent = "npm/3.10.5 node/v4.4.5 win32 x64"
userconfig = “C:\Users\jhoward\.atom\.apmrc”

; environment configs
node-gyp = “K:\Program Files\Atom\Atom x64\resources\app\apm\bin\\…\node_modules\node-gyp\bin\node-gyp.js”

; globalconfig C:\Users\jhoward.atom.apm.apmrc
cache = "C:\Users\jhoward\.atom\.apm"
progress = false

; node bin location = K:\Program Files\Atom\Atom x64\resources\app\apm\bin\node.exe
; cwd = K:\Program Files\Atom\Atom x64\resources\app\apm\bin
; HOME = C:\Users\jhoward
; “npm config ls -l” to show all defaults.

How do I set the paths to point to the correct directory (which could be any drive letter because it’s running portable via USB)?


#2

you have to use the atom’s package manager UI to install/remove packages, but you can try to set the ATOM_HOME variable to where your .atom portable folder lives
for example: export ATOM_HOME=/myusb/.atom or SET ATOM_HOME=e:\.atom