Azure / InnovationEngine

An experiment in simplicity for complex environments
MIT License
35 stars 18 forks source link

wget/curl failures #195

Open hawkeyexl opened 6 months ago

hawkeyexl commented 6 months ago

I can't get wget or curl to work in Innovation Engine. I've tried a few different ways to download the Go tarball, but I keep getting errors. I've run all tests in a local bash shell.

Test 1: Bare wget command

This test fails because IE URL-encodes the carriage return after .gz as %0D and appends it to the URL, causing a 404 error.

wget https://go.dev/dl/go1.22.2.linux-amd64.tar.gz

Test 2: wget with trailing space

Even with a trailing space to avoid the carriage return encoding, this test fails with an exit code 1 (citing an invalid host name), but after successfully downloading the file.

Test 3: curl

This test uses curl instead of wget to download the tarball. It fails with an exit code 3, citing an invalid URL.

curl -O https://go.dev/dl/go1.22.2.linux-amd64.tar.gz

System info

OS: Ubuntu via WSL on Windows 11 Arch: x86 Innovation Engine version: v0.1.3

vmarcella commented 6 months ago

Hi @hawkeyexl, thanks for filing the issue. When attempting to reproduce the issue from my local environment using a markdown document with LF line endings, I'm not able to reproduce the error. IE is currently not line ending agnostic (It expects markdown documents to be LF) which is why the carriage returns are being encoded as actual characters in the examples you've listed. Are there any particular reasons that your markdown documents are using CRLF line endings as opposed to LF? We could potentially make IE agnostic to the line endings of the markdown files being executed if that is desired, but we just need to make sure that this wouldn't impact code block command execution.

hawkeyexl commented 6 months ago

There was no particular reason for using those line endings. It was the default that VSCode selected for me. I doubt I will be the only person to run into this issue for that reason alone.

Thank you for identifying the issue, and if you choose not to be line-ending agnostic, I understand, but I would choose to have broader support personally.