Skip to content

Commit 787bad2

Browse files
committed
Replate non-portable echo -e with printf
POSIX does not define `-e` as a valid option for echo(1). Rely on printf(1) instead. This fix acceptance tests on Ubuntu ARM where echo(1) outputs `-e` causing an invalid configuration: ``` /home/testuser-ssh/.ssh/config: line 1: Bad configuration option: -e ```
1 parent f1d9f4d commit 787bad2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec/acceptance/clone_repo_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@
453453

454454
# copy public key to authorized_keys
455455
run_shell('cat /home/testuser-ssh/.ssh/id_rsa.pub > /home/testuser-ssh/.ssh/authorized_keys')
456-
run_shell('echo -e "Host localhost\n\tStrictHostKeyChecking no\n" > /home/testuser-ssh/.ssh/config')
456+
run_shell('printf "Host localhost\n\tStrictHostKeyChecking no\n" > /home/testuser-ssh/.ssh/config')
457457
run_shell('chown -R testuser-ssh:testuser-ssh /home/testuser-ssh/.ssh')
458458
run_shell('rm -rf /var/run/nologin')
459459
end

0 commit comments

Comments
 (0)