File tree 1 file changed +19
-19
lines changed
1 file changed +19
-19
lines changed Original file line number Diff line number Diff line change @@ -14,24 +14,6 @@ const rl = readline.createInterface({
14
14
output : process . stdout ,
15
15
} ) ;
16
16
17
- // checks and warns if setup was already completed
18
- if ( fs . existsSync ( setupCompletedFlag ) ) {
19
- console . log ( "\x1b[33m%s\x1b[0m" , "Warning: Setup has already been completed once. Running it again may cause issues." ) ;
20
-
21
- rl . question ( "Do you want to proceed with the setup? (yes/no): " , ( answer ) => {
22
- if ( answer . toLowerCase ( ) !== "yes" ) {
23
- console . log ( "Setup aborted." ) ;
24
- rl . close ( ) ;
25
- process . exit ( 0 ) ;
26
- } else {
27
- console . log ( "Proceeding with setup...\n" ) ;
28
- startSetup ( ) ;
29
- }
30
- } ) ;
31
- } else {
32
- startSetup ( ) ;
33
- }
34
-
35
17
// prompts user for cleanup after setup
36
18
const promptForCleanup = ( ) => {
37
19
rl . question ( "\nWould you like to delete this setup script and the completion flag? (yes/no): " , ( answer ) => {
@@ -142,4 +124,22 @@ const startSetup = () => {
142
124
} ;
143
125
144
126
askQuestion ( 0 ) ;
145
- }
127
+ }
128
+
129
+ // checks and warns if setup was already completed
130
+ if ( fs . existsSync ( setupCompletedFlag ) ) {
131
+ console . log ( "\x1b[33m%s\x1b[0m" , "Warning: Setup has already been completed once. Running it again may cause issues." ) ;
132
+
133
+ rl . question ( "Do you want to proceed with the setup? (yes/no): " , ( answer ) => {
134
+ if ( answer . toLowerCase ( ) !== "yes" ) {
135
+ console . log ( "Setup aborted." ) ;
136
+ rl . close ( ) ;
137
+ process . exit ( 0 ) ;
138
+ } else {
139
+ console . log ( "Proceeding with setup...\n" ) ;
140
+ startSetup ( ) ;
141
+ }
142
+ } ) ;
143
+ } else {
144
+ startSetup ( ) ;
145
+ }
You can’t perform that action at this time.
0 commit comments