     else
       callback(new Error('Registry query for PATH failed'))
 
-# Add atom and apm to the PATH
+# Add N1 to the PATH
 #
 # This is done by adding .cmd shims to the root bin folder in the N1
 # install directory that point to the newly installed versions inside

      else
        callback()

# Remove N1 and apm from the PATH
removeCommandsFromPath = (callback) ->
  getPath (error, pathEnv) ->
    return callback(error) if error?

    relativeN1ShPath = path.relative(binFolder, path.join(appFolder, 'resources', 'cli', 'N1.sh'))
    nylasShCommand = "#!/bin/sh\r\n\"$(dirname \"$0\")/#{relativeN1ShPath.replace(/\\/g, '/')}\" \"$@\""

    fs.writeFile nylasCommandPath, nylasCommand, ->
      fs.writeFile nylasShCommandPath, nylasShCommand, ->
        callback()

  addBinToPath = (pathSegments, callback) ->
    pathSegments.push(binFolder)
