Rename isExecutable() to isExecutableSync()

This commit is contained in:
Kevin Sawicki
2013-06-12 18:22:43 -07:00
parent 400aa93bf3
commit a192842dc0
2 changed files with 3 additions and 3 deletions

View File

@@ -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()

View File

@@ -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