Skip to content

Commit 45d88b1

Browse files
committed
issue #587: attempt to fix Mac Azure job
1 parent ea71808 commit 45d88b1

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

.ci/prep_azure.py

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,28 @@
77

88
batches = []
99

10-
batches += [
11-
[
12-
"sudo chown `whoami`: ~",
13-
"chmod u=rwx,g=rx,o= ~",
10+
if os.uname()[0] == 'Linux':
11+
batches += [
12+
[
13+
"sudo chown `whoami`: ~",
14+
"chmod u=rwx,g=rx,o= ~",
1415

15-
"sudo mkdir /var/run/sshd",
16-
"sudo /etc/init.d/ssh start",
16+
"sudo mkdir /var/run/sshd",
17+
"sudo /etc/init.d/ssh start",
1718

18-
"mkdir -p ~/.ssh",
19-
"chmod u=rwx,go= ~/.ssh",
19+
"mkdir -p ~/.ssh",
20+
"chmod u=rwx,go= ~/.ssh",
2021

21-
"ssh-keyscan -H localhost >> ~/.ssh/known_hosts",
22-
"chmod u=rw,go= ~/.ssh/known_hosts",
22+
"ssh-keyscan -H localhost >> ~/.ssh/known_hosts",
23+
"chmod u=rw,go= ~/.ssh/known_hosts",
2324

24-
"cat tests/data/docker/mitogen__has_sudo_pubkey.key > ~/.ssh/id_rsa",
25-
"chmod u=rw,go= ~/.ssh/id_rsa",
25+
"cat tests/data/docker/mitogen__has_sudo_pubkey.key > ~/.ssh/id_rsa",
26+
"chmod u=rw,go= ~/.ssh/id_rsa",
2627

27-
"cat tests/data/docker/mitogen__has_sudo_pubkey.key.pub > ~/.ssh/authorized_keys",
28-
"chmod u=rw,go=r ~/.ssh/authorized_keys",
28+
"cat tests/data/docker/mitogen__has_sudo_pubkey.key.pub > ~/.ssh/authorized_keys",
29+
"chmod u=rw,go=r ~/.ssh/authorized_keys",
30+
]
2931
]
30-
]
3132

3233
if ci_lib.have_apt():
3334
batches.append([

0 commit comments

Comments
 (0)