Skip to content

Conversation

@matthijskooijman
Copy link
Contributor

Before this commit, a write error in prebuildDist.js would lead to another error in the error handling code:

/opt/citizenos/prebuildDist.js:18
    console.log('config.ts write FAILED to ' + pathSettings, err);
					       ^

ReferenceError: pathSettings is not defined
    at Object.<anonymous> (/opt/citizenos/prebuildDist.js:18:48)

With this commit, the actual error message is displayed as intended:

config.ts write FAILED to /.../browser/assets/config/config.json Error: ENOENT: no such file or directory, open '/.../browser/assets/config/config.json'
    at Object.writeFileSync (node:fs:2344:20)
    at Object.<anonymous> (/opt/citizenos/prebuildDist.js:16:8)

Before this commit, a write error in prebuildDist.js would lead to another
error in the error handling code:

	/opt/citizenos/prebuildDist.js:18
	    console.log('config.ts write FAILED to ' + pathSettings, err);
						       ^

	ReferenceError: pathSettings is not defined
	    at Object.<anonymous> (/opt/citizenos/prebuildDist.js:18:48)

With this commit, the actual error message is displayed as intended:

	config.ts write FAILED to /.../browser/assets/config/config.json Error: ENOENT: no such file or directory, open '/.../browser/assets/config/config.json'
	    at Object.writeFileSync (node:fs:2344:20)
	    at Object.<anonymous> (/opt/citizenos/prebuildDist.js:16:8)
@ilmartyrk ilmartyrk merged commit 2d7cc43 into citizenos:master Oct 22, 2024
@ilmartyrk
Copy link
Member

Good catch, thank you!

@matthijskooijman
Copy link
Contributor Author

Thanks for merging my changes so quickly! I have a few more things I ran into while self-hosting, I'll try to find some time to clean those up and report/submit them over the next few weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants