         if portableAtomHomeNaturallyExists
           fs.renameSync(portableAtomHomeBackupPath, portableAtomHomePath) if not fs.existsSync(portableAtomHomePath)
         else
-          rimraf.sync(portableAtomHomePath) if fs.existsSync(portableAtomHomePath)
-        rimraf.sync(portableAtomHomeBackupPath) if fs.existsSync(portableAtomHomeBackupPath)
+          fs.removeSync(portableAtomHomePath) if fs.existsSync(portableAtomHomePath)
+        fs.removeSync(portableAtomHomeBackupPath) if fs.existsSync(portableAtomHomeBackupPath)
 
       describe "with .atom directory sibling to exec", ->
         beforeEach ->


      describe "without .atom directory sibling to exec", ->
        beforeEach ->
          rimraf.sync(portableAtomHomePath) if fs.existsSync(portableAtomHomePath)

        it "returns false", ->
          expect(AtomPortable.isPortableInstall("win32", environmentAtomHome)).toBe false

path = require "path"
fs = require 'fs-plus'
temp = require "temp"
AtomPortable = require "../src/browser/atom-portable"

describe "Set Portable Mode on #win32", ->
