Open thom4parisot opened 5 years ago
I am glad its doing something good for you.
I have a feeling its something about the working directory in the CI enviroment. The error comes when the files is empty or cant be found. If you do a cat something.sql
do you get the right code?
Yeah, that was my feeling too but if I do cat something.sql
, echo $PWD
and ls .
, everything points in the direction that it's the correct working directory.
When you see an npm task prelude line, the last bit is its working directory:
> alasql-cli-arguments-issue@1.0.0 test /builds/oncletom/alasql-cli-arguments-issue
In the project I use alasql into, I use other Node.js-based CLI tools and they don't have any problem.
Hmm. Very strange. I never really used gitlabCI. It should just work.
And you cant even pipe data into alasql.
Hmmmmmmmm.
Yeah it's weird. I opened an issue here: https://gitlab.com/gitlab-org/gitlab-runner/issues/3950
I tried with alasql "$(cat correspondances.sql)"
and it still thinks there is no input. Even when I had the plain query as alasql 'SELECT * INTO CSV(...) FROM XLS(...)'
, which worked perfectly fine on my computer.
Thanks so much for providing this tool. I'm enjoying this discovery.
Something is not working as expected:
When I run
alasql --file something.sql
on GitLabCI, I am welcomed with this message:(see job output)
If I clone this repo locally with
node@v10.15.0
andnpm@v6.5.0
, the same commandnpm test
works.If I do reuse the same image as on GitLabCI, with Docker, the same command
npm test
works.I created this repository to describe the problem: https://gitlab.com/oncletom/alasql-cli-arguments-issue, the command
npm test
fails.If I feed the same file to
alasql
within a Node script, the problem does not happen.I have not been able to reproduce this problem elsewhere.