Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text wrap problem in BlueSky Admin Setup applescript #13

Closed
illudium opened this issue Feb 27, 2018 · 3 comments
Closed

Text wrap problem in BlueSky Admin Setup applescript #13

illudium opened this issue Feb 27, 2018 · 3 comments

Comments

@illudium
Copy link

There's additional whitespace and possibly a carriage return/newline in

do shell script "echo 'Host " & serverAddr & " UseKeychain yes' >> ~/.ssh/config"

that renders ~/.ssh/config file unusable, causing ensuing ssh (outgoing) connections to fail.
The resulting config file shows the following which should of course all be on one line:

Host XX.ip.address
   Use Keychain yes

The problem might only occur if said file already has an entry.

@sphen13
Copy link
Contributor

sphen13 commented Mar 9, 2018

i have seen this elsewhere too. i dont think the multi-line entry is the issue but actually that it is not respecting previous entires and creating a line-wrap issue between the old and the new. going to look to fix this.

@sphen13
Copy link
Contributor

sphen13 commented Mar 9, 2018

ok i duplicated it - its actually when your existing config file doesn't contain a newline character at the end of it (which is relatively hard to do) - so the echo ends up not writing on a newline.

simple idea would be to just include a newline before bluesky admin setup writes to the file - better would be to check for the lack of newline and act accordingly

@sphen13
Copy link
Contributor

sphen13 commented Mar 9, 2018

i fixed this but am waiting for #14 to me merged before i submit. it will require a change within something in the docker image as well.

for reference: https://github.com/sphen13/BlueSky/blob/992c39b2c5584f5d59faf5620eb2925b888a4033/Admin%20Tools/setup.applescript#L57

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

No branches or pull requests

2 participants