mirror of
https://github.com/atom/atom.git
synced 2026-01-22 21:38:10 -05:00
Rename isExecutable() to isExecutableSync()
This commit is contained in:
@@ -16,7 +16,7 @@ describe "install(commandPath, callback)", ->
|
||||
it "symlinks the command and makes it executable", ->
|
||||
fsUtils.write(commandPath, 'test')
|
||||
expect(fsUtils.isFileSync(commandPath)).toBeTruthy()
|
||||
expect(fsUtils.isExecutable(commandPath)).toBeFalsy()
|
||||
expect(fsUtils.isExecutableSync(commandPath)).toBeFalsy()
|
||||
expect(fsUtils.isFileSync(destinationPath)).toBeFalsy()
|
||||
|
||||
installDone = false
|
||||
@@ -31,4 +31,4 @@ describe "install(commandPath, callback)", ->
|
||||
expect(installError).toBeNull()
|
||||
expect(fsUtils.isFileSync(destinationPath)).toBeTruthy()
|
||||
expect(fs.realpathSync(destinationPath)).toBe fs.realpathSync(commandPath)
|
||||
expect(fsUtils.isExecutable(destinationPath)).toBeTruthy()
|
||||
expect(fsUtils.isExecutableSync(destinationPath)).toBeTruthy()
|
||||
|
||||
@@ -58,7 +58,7 @@ module.exports =
|
||||
false
|
||||
|
||||
# Returns true if the specified path is exectuable.
|
||||
isExecutable: (path) ->
|
||||
isExecutableSync: (path) ->
|
||||
try
|
||||
(fs.statSync(path).mode & 0o777 & 1) isnt 0
|
||||
catch e
|
||||
|
||||
Reference in New Issue
Block a user