./init.sh script adding extra return characters "^M" on daq-site computer

Open
#23 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
docker, next.js, shell

Research direction

Start with init.sh and compare its generated .evn.production output when run on the daq-site computer versus macOS or Windows Git Bash. Inspect the generated lines for the reported ^M characters and verify that the corrected output still supplies TELEVIEW_PUBLIC_SITE_HOST for the Next.js Docker image build.

Written by the indexing model from the issue text.

Description

bug deployment

The init.sh script is supposed to copy a fraction of the variables from the .env file into a the required format for next.js, a file called .evn.production. When this file is made on a mac (bash) or windows (git-bash) it works as expected.

However, on the daq-site computer, it add an extra ^M character to each line, sometimes at the end of the line. Sometimes at the before the last double-quote ". The is some sort of line return character.

A two hours of Google searching did not reveal the cause of this issue. No one else seems to have it.

Is it the version of bash?

Should I just pick a different interpreter with the hashbang at the top of the file?

Did I write the init.sh script in wrong way?

Ideally this script would not need to exist. However it seems that some information, specifically, the host name TELEVIEW_PUBLIC_SITE_HOST, is needed at the NEXT.js docker image build-time (see issue #21).

Dominant language
TypeScript
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from simonsobs/TeleView

All issues in simonsobs/TeleView

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.