Skip to content

Remove BOM from PublishClient.sh.#183

Open
Teemuerik wants to merge 1 commit into
0x0ade:mainfrom
Teemuerik:main
Open

Remove BOM from PublishClient.sh.#183
Teemuerik wants to merge 1 commit into
0x0ade:mainfrom
Teemuerik:main

Conversation

@Teemuerik

Copy link
Copy Markdown

The PublishClient.sh file contained a Byte Order Mark at the start. This is an invisible byte sequence at the start of the file that exists mostly for legacy applications, but is not recommended. In this case, it caused the following mostly harmless error:
./PublishClient.sh: line 1: #!/bin/sh: No such file or directory

The "shebang" line has to be the first line with nothing before it, so the program loader throws this error since there is a byte sequence before it (the BOM).

The PublishClient.sh file contained a Byte Order Mark at the start. This
is an invisible byte sequence at the start of the file that exists
mostly for legacy applications, but is not recommended. In this case, it
caused the following mostly harmless error:
./PublishClient.sh: line 1: #!/bin/sh: No such file or directory

The "shebang" line has to be the first line with nothing before it, so
the program loader throws this error since there is a byte sequence
before it (the BOM).
@Teemuerik

Copy link
Copy Markdown
Author

To add even more detail:

This can be checked on linux with the command head -1 PublishClient.sh | od -c. I am not sure about a windows equivalent, but a hex editor or similar should work as well.

Raw file contents with previous version:

head -1 PublishClient.sh | od -c
0000000 357 273 277   #   !   /   b   i   n   /   s   h  \n
0000015

Which gave the following output when run (only start shown):

$ ./PublishClient.sh
./PublishClient.sh: line 1: #!/bin/sh: No such file or directory
Restore complete (0.5s)
  CelesteNet.Shared net8.0 succeeded with 1 warning(s) (0.2s) → CelesteNet.Shared/bin/Release/net8.0/CelesteNet.Shared.dll
...

Raw file contents with this version:

head -1 PublishClient.sh | od -c            
0000000   #   !   /   b   i   n   /   s   h  \n
0000012

Which gives the following output when run (no error, only start shown):

$ ./PublishClient.sh
Restore complete (0.5s)
  CelesteNet.Shared net8.0 succeeded with 1 warning(s) (0.1s) → CelesteNet.Shared/bin/Release/net8.0/CelesteNet.Shared.dll
...

I know this is a pretty small fix, but thought I should get this out of the way first, since it would not make sense to include in a Ghost client code PR.

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.

1 participant