Skip to content

pmtiles fix: suggested fix for windows line endings in shell script#29

Open
ToBeAss wants to merge 2 commits into
mainfrom
pmtiles-sh-windows-line-endings-error
Open

pmtiles fix: suggested fix for windows line endings in shell script#29
ToBeAss wants to merge 2 commits into
mainfrom
pmtiles-sh-windows-line-endings-error

Conversation

@ToBeAss

@ToBeAss ToBeAss commented Sep 9, 2025

Copy link
Copy Markdown
Contributor

When the script was copied to the Linux Docker container, the \r characters from Windows line endings were interpreted as literal characters, causing syntax errors like:

$'\r': command not found
set: -: invalid option
syntax error: unexpected end of file
The solution was to:

Convert the shell script from Windows line endings (\r\n) to Unix line endings (\n) Copy the converted script to the Docker container
Make sure the script is executable with chmod +x

Feat: Added global .gitignore for venv, .venv and pycache

When the script was copied to the Linux Docker container, the \r characters from Windows line endings were interpreted as literal characters, causing syntax errors like:

$'\r': command not found
set: -: invalid option
syntax error: unexpected end of file
The solution was to:

Convert the shell script from Windows line endings (\r\n) to Unix line endings (\n)
Copy the converted script to the Docker container
Make sure the script is executable with chmod +x

@espen080 espen080 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Supert om du tar bort output, da blir det litt lettere å se hva som er endret :)

Some et alternativ til å endre filen i python koden er det og mulig å kjøre en util som heter unix2dos i docker filen slik at dilen alltid vil ha unix line endings i imaget, opp til deg om du vil gjøre noe med dette eller la det stå som det er :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants