File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -233,7 +233,7 @@ export async function shutdownAllServers() {
233233function loadState ( ) {
234234 try {
235235 return JSON . parse (
236- fs . readFileSync ( path . join ( getCoreDir ( ) , 'homestate.json' ) , 'utf8' )
236+ fs . readFileSync ( path . join ( getCoreDir ( ) , 'homestate.json' ) , { encoding : 'utf-8' } )
237237 ) ;
238238 } catch ( err ) { }
239239}
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ export function sleep(ms) {
1818export async function loadJSON ( filePath ) {
1919 try {
2020 await fs . access ( filePath ) ;
21- return JSON . parse ( await fs . readFile ( filePath , 'utf8' ) ) ;
21+ return JSON . parse ( await fs . readFile ( filePath , { encoding : 'utf-8' } ) ) ;
2222 } catch ( err ) {
2323 console . error ( err ) ;
2424 return null ;
Original file line number Diff line number Diff line change @@ -49,7 +49,9 @@ export default class ProjectConfig {
4949 this . _parsed . push ( path ) ;
5050 let section = null ;
5151 let option = null ;
52- for ( let line of ( await fs . readFile ( path , 'utf-8' ) ) . split ( this . reLines ) ) {
52+ for ( let line of ( await fs . readFile ( path , { encoding : 'utf-8' } ) ) . split (
53+ this . reLines
54+ ) ) {
5355 // Remove comments
5456 line = line . replace ( this . reComment , '' ) ;
5557 if ( ! line ) {
You can’t perform that action at this time.
0 commit comments