File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " nodecg-gui" ,
3- "version" : " 0.0.1 " ,
3+ "version" : " 0.0.2 " ,
44 "license" : " MIT" ,
55 "scripts" : {
66 "dev" : " electron-webpack dev" ,
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ function getNodeCGUrl(e?: Electron.IpcMainEvent) {
7070 const uri = new URI ( )
7171 . protocol ( 'http' )
7272 . hostname ( config . host || 'localhost' )
73- . port ( config . port . toString ( ) || '9090' ) ;
73+ . port ( config . port || '9090' ) ;
7474 const retVal = uri . toString ( ) ;
7575 if ( e !== undefined ) e . returnValue = retVal ;
7676 return retVal ;
Original file line number Diff line number Diff line change @@ -13,6 +13,11 @@ interface ConfigData {
1313export function readConfig ( confFile : string ) {
1414 let config : ConfigData = { } ;
1515
16+ if ( ! fs . existsSync ( nodecgPath ( 'cfg' ) ) ) {
17+ console . log ( "cfg dir does not exist, creating" ) ;
18+ fs . mkdirSync ( nodecgPath ( 'cfg' ) ) ;
19+ }
20+
1621 let confPath = nodecgPath ( 'cfg' , `${ confFile } .json` ) ;
1722 try {
1823 const rawConfig = fs . readFileSync ( confPath ) ;
You can’t perform that action at this time.
0 commit comments