File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ function get_path(args) {
24
24
let filename = args . _ [ 1 ] ;
25
25
if ( filename !== path . basename ( filename ) ) {
26
26
// filename is an absolute path
27
- return filename ;
27
+ return filename ;
28
28
}
29
29
return path . join ( process . cwd ( ) , args . _ [ 1 ] ) ;
30
30
}
@@ -39,7 +39,13 @@ module.exports = function init(args) {
39
39
if ( path_to_json === undefined ) return ;
40
40
41
41
// append .json if filename passed is not of json type
42
- if ( path . extname ( path_to_json ) !== ".json" ) path_to_json += '.json' ;
42
+ if ( path . extname ( path_to_json ) !== '' && path . extname ( path_to_json ) !== ".json" ) path_to_json += ".json" ;
43
+
44
+ // append browserstack.json if filename is a path without filename
45
+ if ( path . extname ( path_to_json ) === '' ) path_to_json = path . join ( path_to_json , "browserstack.json" ) ;
46
+
47
+ console . log ( path_to_json ) ;
48
+ return path_to_json ;
43
49
44
50
let config = {
45
51
file : require ( '../templates/configTemplate' ) ( ) ,
You can’t perform that action at this time.
0 commit comments