mirror of
https://github.com/atom/atom.git
synced 2026-02-19 02:44:29 -05:00
Install apm command when Atom starts
This changes the command installation to use symlinks instead of copying over the contents of the file.
This commit is contained in:
@@ -73,8 +73,11 @@ module.exports =
|
||||
return done(false) unless path?.length > 0
|
||||
fs.exists path, (exists) ->
|
||||
if exists
|
||||
fs.stat path, (err, stat) ->
|
||||
done(stat?.isDirectory() ? false)
|
||||
fs.stat path, (error, stat) ->
|
||||
if error?
|
||||
done(false)
|
||||
else
|
||||
done(stat.isDirectory())
|
||||
else
|
||||
done(false)
|
||||
|
||||
@@ -87,6 +90,13 @@ module.exports =
|
||||
catch e
|
||||
false
|
||||
|
||||
# Returns true if the specified path is exectuable.
|
||||
isExecutable: (path) ->
|
||||
try
|
||||
(fs.statSync(path).mode & 0o777 & 1) isnt 0
|
||||
catch e
|
||||
false
|
||||
|
||||
# Returns an array with all the names of files contained
|
||||
# in the directory path.
|
||||
list: (rootPath, extensions) ->
|
||||
|
||||
Reference in New Issue
Block a user