startup_script not working when using GitLab CI template management

When I create the template directly on Coder UI and start a workspace, everything is fine. However, when I set-up GitLab CI to push the exact same template, create the workspace, the startup_script prompts an error. Here's the startup_script: startup_script = <<EOF #!/bin/sh set -e sudo apt-get update # install VS Code curl -Lk 'https://code.visualstudio.com/sha/download?build=stable&os=cli-alpine-x64' --output vscode_cli.tar.gz mkdir -p /tmp/vscode-cli tar -xf vscode_cli.tar.gz -C /tmp/vscode-cli rm vscode_cli.tar.gz # start the web server on a specific port /tmp/vscode-cli/code serve-web --port 13338 --without-connection-token --accept-server-license-terms >/tmp/vscode-web.log 2>&1 & EOF Here's the error from workspace created by GitLab CI: Pulling image "codercom/enterprise-base:ubuntu" Successfully pulled image "codercom/enterprise-base:ubuntu" in 1.11s (1.11s including waiting) Created container dev Started container dev /bin/sh: 2: set: Illegal option -
4 Replies
Codercord
Codercord5d ago
<#1330836496416112682>
Category
Help needed
Product
Coder (v2)
Platform
N/A
Logs
Please post any relevant logs/error messages.
What operating system are you running Coder (v2) on?
Phorcys
Phorcys5d ago
@joelynnnnn it looks like there might be issues with your line endings, are they set to LF?
joelynnnnn
joelynnnnnOP4d ago
yes it was the line endings causing the issues ;-; thank you!
Codercord
Codercord4d ago
@joelynnnnn closed the thread.

Did you find this page helpful?