MCPcopy
hub / github.com/vercel/hyper / installCLI

Function installCLI

app/utils/cli-install.ts:129–156  ·  view source on GitHub ↗
(withNotification: boolean)

Source from the content-addressed store, hash-verified

127};
128
129export const installCLI = async (withNotification: boolean) => {
130 if (process.platform === 'win32') {
131 try {
132 await addBinToUserPath();
133 logNotify(
134 withNotification,
135 'Hyper CLI installed',
136 'You may need to restart your computer to complete this installation process.'
137 );
138 } catch (err) {
139 logNotify(withNotification, 'Hyper CLI installation failed', `Failed to add Hyper CLI path to user PATH ${err}`);
140 }
141 } else if (process.platform === 'darwin' || process.platform === 'linux') {
142 // AppImages are mounted on run at a temporary path, don't create symlink
143 if (process.env['APPIMAGE']) {
144 console.log('Skipping CLI symlink creation as it is an AppImage install');
145 return;
146 }
147 try {
148 await addSymlink(!withNotification);
149 logNotify(withNotification, 'Hyper CLI installed', `Symlink created at ${cliLinkPath}`);
150 } catch (error) {
151 logNotify(withNotification, 'Hyper CLI installation failed', `${error}`);
152 }
153 } else {
154 logNotify(withNotification, 'Hyper CLI installation failed', `Unsupported platform ${process.platform}`);
155 }
156};

Callers 2

index.tsFile · 0.90
commands.tsFile · 0.90

Calls 4

addBinToUserPathFunction · 0.85
logNotifyFunction · 0.85
addSymlinkFunction · 0.85
logMethod · 0.45

Tested by

no test coverage detected