File tree Expand file tree Collapse file tree 1 file changed +14
-25
lines changed
cli/src/main/java/dev/starfix Expand file tree Collapse file tree 1 file changed +14
-25
lines changed Original file line number Diff line number Diff line change @@ -57,13 +57,8 @@ public int config() throws Exception {
5757 public int cloneCmd (@ Parameters (index = "0" ) String url ) {
5858 File configFilePath = getConfigFilePath (); // Get path for config file
5959
60- try {
61- if (!configFilePath .exists ()) {// Check if config file exist
62- defaultConfig ();
63- }
64- } catch (Exception e ) {
65- e .printStackTrace ();
66-
60+ if (!configFilePath .exists ()) {// Check if config file exist
61+ defaultConfig (); // Sets up default config
6762 }
6863
6964 CloneUrl cloneUrl = new CloneUrl (url );
@@ -161,29 +156,23 @@ public static File getConfigFile() {
161156
162157 }
163158
164- // Function to load default config
165- public void defaultConfig () {
159+ // Function to setup default config
160+ void defaultConfig () {
166161 String path_env = System .getenv ("Path" ); // System PATH variable
167162 clone_path = System .getProperty ("user.home" ) + "/code" ; // set clone_path to /home/user_name/code
168163
169- try {
170- if (isWindows ()){// check if Windows OS
171- if (path_env .contains ("Microsoft VS Code" )){ // If PATH has VScode
172- ide = "code.cmd" ;
173- } else if (path_env .contains ("IntelliJ IDEA" )){ // If PATH has IntelliJ
174- ide = "idea64.exe" ;
175- }
164+ if (isWindows ()){// check if Windows OS
165+ if (path_env .contains ("Microsoft VS Code" )){ // If PATH has VScode
166+ ide = "code.cmd" ;
167+ } else if (path_env .contains ("IntelliJ IDEA" )){ // If PATH has IntelliJ
168+ ide = "idea64.exe" ;
176169 }
177- // check if Linux OS
178- // if(isLinux()){}
179-
180- // check if Mac OS
181- // if(isMac()){}
182-
183- } catch (Exception e ) {
184- e .printStackTrace ();
185-
186170 }
171+ // check if Linux OS
172+ // if(isLinux()){}
173+
174+ // check if Mac OS
175+ // if(isMac()){}
187176 }
188177 // Function to edit configuration and serves for command line starfix config
189178 // editor
You can’t perform that action at this time.
0 commit comments