@@ -3,8 +3,8 @@ import { initializeArgs } from "./args.js";
33import { abort , setDryrun } from "./exitMessages.js" ;
44import { index } from "./newCommands/index.js" ;
55import { addKnownHost } from "./newCommands/register.js" ;
6- import { CTRL_C , moveToBottom } from "./prompt.js" ;
7- import { checkVersionIfOutdated , package_json } from "./printUtils.js" ;
6+ import { CTRL_C , moveToBottom , NORMAL_COLOR } from "./prompt.js" ;
7+ import { checkVersionIfOutdated , outputGit , package_json , } from "./printUtils.js" ;
88process . argv . splice ( 0 , 1 ) ; // Remove node
99process . argv . splice ( 0 , 1 ) ; // Remove index
1010if ( process . argv . length > 0 && process . argv [ 0 ] . endsWith ( "version" ) ) {
@@ -45,10 +45,17 @@ if (stdin.isTTY) {
4545} ) ( ) . catch ( ( e ) => {
4646 moveToBottom ( ) ;
4747 const eStr = "" + e ;
48- if ( eStr . includes ( "Permission denied" ) ) {
48+ if ( eStr . includes ( "Permission denied (publickey) " ) ) {
4949 addKnownHost ( ) ;
50- console . log ( "\x1b[31mAn error occurred, please try again. If the problem persists reach out on http://discord.merrymake.eu \x1b[0m" , e ) ;
50+ outputGit ( `A permission error occurred. Please try these solutions:
51+ 1. Make sure you have registered the device with the correct email using 'mm start'
52+ 2. Run 'mm help'
53+ 3. Run this command again.
54+ 4. If the problem persists reach out on http://discord.merrymake.eu` +
55+ NORMAL_COLOR ) ;
56+ }
57+ else {
58+ console . error ( `\x1b[31mERROR ${ eStr . trimEnd ( ) } \x1b[0m` ) ;
5159 }
52- console . log ( `\x1b[31mERROR ${ eStr . trimEnd ( ) } \x1b[0m` ) ;
5360 abort ( ) ;
5461} ) ;
0 commit comments