Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions actions/rsync-cache/dist/commit.js
Original file line number Diff line number Diff line change
Expand Up @@ -30907,17 +30907,16 @@ class Rsync {

// Pull the cache from the remote server.
async pull() {
let exit_code = -1;
const rsync_args = [
this.ssh_dir, // FROM
path$1.basename(this.path) + "/", // TO
];

if (this.disabled) {
exit_code = this.fetch_only();
} else {
const rsync_args = [
this.ssh_dir, // FROM
path$1.basename(this.path) + "/", // TO
];
let exit_code = await this.run(rsync_args);

exit_code = await this.run(rsync_args);
if (this.disabled || exit_code != 0) {
// Fallback to rclone:
exit_code = this.fetch_only();
}

if (exit_code != 0) {
Expand Down
2 changes: 1 addition & 1 deletion actions/rsync-cache/dist/commit.js.map

Large diffs are not rendered by default.

17 changes: 8 additions & 9 deletions actions/rsync-cache/dist/restore.js
Original file line number Diff line number Diff line change
Expand Up @@ -30907,17 +30907,16 @@ class Rsync {

// Pull the cache from the remote server.
async pull() {
let exit_code = -1;
const rsync_args = [
this.ssh_dir, // FROM
path$1.basename(this.path) + "/", // TO
];

if (this.disabled) {
exit_code = this.fetch_only();
} else {
const rsync_args = [
this.ssh_dir, // FROM
path$1.basename(this.path) + "/", // TO
];
let exit_code = await this.run(rsync_args);

exit_code = await this.run(rsync_args);
if (this.disabled || exit_code != 0) {
// Fallback to rclone:
exit_code = this.fetch_only();
}

if (exit_code != 0) {
Expand Down
2 changes: 1 addition & 1 deletion actions/rsync-cache/dist/restore.js.map

Large diffs are not rendered by default.

17 changes: 8 additions & 9 deletions actions/rsync-cache/src/rsync.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,17 +153,16 @@ export default class Rsync {

// Pull the cache from the remote server.
async pull() {
let exit_code = -1;
const rsync_args = [
this.ssh_dir, // FROM
path.basename(this.path) + "/", // TO
];

if (this.disabled) {
exit_code = this.fetch_only();
} else {
const rsync_args = [
this.ssh_dir, // FROM
path.basename(this.path) + "/", // TO
];
let exit_code = await this.run(rsync_args);

exit_code = await this.run(rsync_args);
if (this.disabled || exit_code != 0) {
// Fallback to rclone:
exit_code = this.fetch_only();
}

if (exit_code != 0) {
Expand Down
6 changes: 3 additions & 3 deletions actions/rsync-cache/test/rsync_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,11 @@ test("failure triggers a notice", async () => {
let rsync = deps.rsync();

deps.exec.exit_code = 1;
await rsync.pull();
await rsync.pull(); // Also calls `fetch_only`.
await rsync.push();

assert.equal(deps.exec.commands.length, 2);
assert.equal(deps.core.notices.length, 2);
assert.equal(deps.exec.commands.length, 3);
assert.equal(deps.core.notices.length, 3);
});

test("can pull the cache", async () => {
Expand Down