ignacio / lua-appveyor-example

For experiments with AppVeyor CI
MIT License
13 stars 8 forks source link

Too long path #7

Closed moteus closed 9 years ago

moteus commented 9 years ago

This is not really your problem but after you set PATH env variable appveyor utility is not accessable any more (https://ci.appveyor.com/project/moteus/lua-lcurl/build/job/v70kn8skunrq044q)

:: here we can use appveyor
echo **************************************
echo PATH1: %PATH%
appveyor AddMessage "End install Lua/LuaRocks"

set PATH=%NEW_PATH%
:: here  appveyor is not accessable
echo **************************************
echo PATH2: %PATH%
appveyor AddMessage "End install Lua/LuaRocks"
ignacio commented 9 years ago

I hit that problem yesterday, so I had to put Lua paths first. Since I'm not using appveyor executable anymore I didn't notice.

I tested this workaround and it seems to be working.

moteus commented 9 years ago

You mean

set PATH2=%PATH%
set PATH=%LUA_DIR%\bin;%PATH2%

?

ignacio commented 9 years ago

Yep. I'm testing that at the moment.

edit: bah, that's not it. But I think I found the culprit.

ignacio commented 9 years ago

Pretty sure this is the problem:

https://github.com/moteus/lua-lcurl/blob/d4d996cd7ae549b1086773d1ed91dc68db860172/.appveyor/install.bat#L169

Remove that whitespace between the ampersand and the caret: set NEW_PATH=%PATH% & ^

Can you confirm if it fixes the issue? I managed to reproduce the bug:

C:\Users\Ignacio>set PATH=%PATH%;C:\luarocks_test\2.1\bin & echo "something else"
"something else"

C:\Users\Ignacio>7z
'7z' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Ignacio>set PATH=%PATH%;C:\luarocks_test\2.1\bin& echo "something else"
"something else"

C:\Users\Ignacio>7z

7-Zip 9.10 beta  Copyright (c) 1999-2009 Igor Pavlov  2009-12-22

Usage: 7z <command> [<switches>...] <archive_name> [<file_names>...]
       [<@listfiles...>]
moteus commented 9 years ago

You are right. Sorry for this. Now it works.

PS. You are not export LUA and LR_EXTERNAL variables this is why I start update this.

ignacio commented 9 years ago

No problem! Will add those variables right away.