File tree Expand file tree Collapse file tree 1 file changed +4
-15
lines changed Expand file tree Collapse file tree 1 file changed +4
-15
lines changed Original file line number Diff line number Diff line change @@ -22,23 +22,12 @@ class Init
2222
2323 def call ( dir = Dir . pwd )
2424 config_path = File . join ( dir , "cypress.config.js" )
25- config_content = determine_new_config ( config_path )
26- File . write ( config_path , config_content )
27- puts "Cypress config (re)initialized in #{ config_path } "
28- end
29-
30- private
31-
32- def determine_new_config ( config_path )
3325 if File . exist? ( config_path )
34- merge_existing_with_defaults ( config_path )
35- else
36- DEFAULT_CONFIG
26+ warn ( 'Cypress config is already exist!' )
27+ return
3728 end
38- end
39-
40- def merge_existing_with_defaults ( config_path )
41- File . read ( config_path )
29+ File . write ( config_path , DEFAULT_CONFIG )
30+ puts "Cypress config initialized in #{ config_path } "
4231 end
4332 end
4433end
You can’t perform that action at this time.
0 commit comments