Skip to content

Commit

Permalink
feat: add success messages
Browse files Browse the repository at this point in the history
  • Loading branch information
vCaisim committed Oct 3, 2024
1 parent a55fe22 commit 7b7c1fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/cmd/src/services/cache/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { retrieveCache } from '../../api';
import { PRESETS } from '../../commands/cache/options';
import { getCacheCommandConfig } from '../../config/cache';
import { getCI } from '../../env/ciProvider';
import { success } from '../../logger';
import { unzipBuffer } from './fs';
import { MetaFile } from './lib';
import { download } from './network';
Expand Down Expand Up @@ -45,6 +46,8 @@ export async function handleGetCache() {
if (preset === PRESETS.lastRun) {
await handlePostLastRunPreset(config.values, ci, meta);
}

success('Cache restored. Cache ID: %s', result.cacheId);
} catch (e) {
if (isAxiosError(e)) {
if (
Expand Down
3 changes: 3 additions & 0 deletions packages/cmd/src/services/cache/set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { createCache } from '../../api';
import { PRESETS } from '../../commands/cache/options';
import { getCacheCommandConfig } from '../../config/cache';
import { getCI } from '../../env/ciProvider';
import { success } from '../../logger';
import { filterPaths, zipFilesToBuffer } from './fs';
import { createMeta, getLastRunFilePath } from './lib';
import {
Expand Down Expand Up @@ -66,6 +67,8 @@ export async function handleSetCache() {
cacheId: result.cacheId,
uploadUrl: result.metaUploadUrl,
});

success('Cache uploaded. Cache ID: %s', result.cacheId);
}

async function handleArchiveUpload({
Expand Down

0 comments on commit 7b7c1fa

Please sign in to comment.