Skip to content
Open
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
10 changes: 6 additions & 4 deletions packages/usdk/lib/pull.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import { extractZip } from './zip-util.mjs';
import { npmInstall } from './npm-util.mjs';
import { aiProxyHost } from '../packages/upstreet-agent/packages/react-agents/util/endpoints.mjs';
import pc from 'picocolors';
import { makeId } from '../packages/upstreet-agent/packages/react-agents/util/util.mjs';
import path from 'path';
import { mkdirp } from 'mkdirp';

export const pull = async (args, opts) => {
const agentId = args._[0] ?? '';
Expand Down Expand Up @@ -64,19 +67,18 @@ export const pull = async (args, opts) => {
}
} catch (err) {
console.warn('npm install failed:', err.stack);
process.exit(1);
throw err;
}
} else {
const text = await req.text();
console.warn('pull request error', text);
process.exit(1);
throw new Error(`pull request error: ${text}`);
}
} catch (err) {
console.warn('pull request failed', err);
process.exit(1);
throw err;
}
} else {
console.log('not logged in');
process.exit(1);
}
};