diff options
| author | Hisham Muhammad <hisham@gobolinux.org> | 2010-10-15 14:10:35 -0300 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2010-10-15 14:10:35 -0300 |
| commit | 7c0028d1ce3d57a6e877f2b28c9fb87e39bab1fc (patch) | |
| tree | 0abceb62353976d36a99373783e83807da37eee0 /src | |
| parent | ffcd0f2e953e242af5de2ee4b9d52768891ed98b (diff) | |
| parent | cd45b48e8b9ff3e30fa13ea9b17b6d5a01a4b9d5 (diff) | |
| download | luarocks-7c0028d1ce3d57a6e877f2b28c9fb87e39bab1fc.tar.gz luarocks-7c0028d1ce3d57a6e877f2b28c9fb87e39bab1fc.tar.bz2 luarocks-7c0028d1ce3d57a6e877f2b28c9fb87e39bab1fc.zip | |
Merge branch 'master' of github.com:keplerproject/luarocks
Diffstat (limited to 'src')
| -rw-r--r-- | src/luarocks/fetch/git.lua | 4 | ||||
| -rw-r--r-- | src/luarocks/fs/unix.lua | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/luarocks/fetch/git.lua b/src/luarocks/fetch/git.lua index f2f17fb5..6305d781 100644 --- a/src/luarocks/fetch/git.lua +++ b/src/luarocks/fetch/git.lua | |||
| @@ -39,12 +39,12 @@ function get_sources(rockspec, extract, dest_dir) | |||
| 39 | end | 39 | end |
| 40 | fs.change_dir(store_dir) | 40 | fs.change_dir(store_dir) |
| 41 | if not fs.execute(unpack(command)) then | 41 | if not fs.execute(unpack(command)) then |
| 42 | return nil, "Failed fetching files from GIT while cloning." | 42 | return nil, "Failed cloning git repository." |
| 43 | end | 43 | end |
| 44 | fs.change_dir(module) | 44 | fs.change_dir(module) |
| 45 | if checkout_command then | 45 | if checkout_command then |
| 46 | if not fs.execute(unpack(checkout_command)) then | 46 | if not fs.execute(unpack(checkout_command)) then |
| 47 | return nil, "Failed fetching files from GIT while getting tag/branch." | 47 | return nil, "Failed checking out tag/branch from git repository." |
| 48 | end | 48 | end |
| 49 | end | 49 | end |
| 50 | fs.delete(".git") | 50 | fs.delete(".git") |
diff --git a/src/luarocks/fs/unix.lua b/src/luarocks/fs/unix.lua index f2290412..c5769bac 100644 --- a/src/luarocks/fs/unix.lua +++ b/src/luarocks/fs/unix.lua | |||
| @@ -101,6 +101,11 @@ function is_actual_binary(filename) | |||
| 101 | if file then | 101 | if file then |
| 102 | local found = false | 102 | local found = false |
| 103 | local first = file:read() | 103 | local first = file:read() |
| 104 | if not first then | ||
| 105 | file:close() | ||
| 106 | print("Warning: could not read "..filename) | ||
| 107 | return false | ||
| 108 | end | ||
| 104 | if first:match("#!.*lua") then | 109 | if first:match("#!.*lua") then |
| 105 | file:close() | 110 | file:close() |
| 106 | return true | 111 | return true |
