mirror of
https://github.com/felixrieseberg/macintosh.js.git
synced 2024-12-28 18:29:29 +00:00
fix: Handle possible line ending troubles
This commit is contained in:
parent
ac0d452957
commit
9797bb115c
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@ -0,0 +1 @@
|
||||
* text eol=lf
|
@ -153,6 +153,9 @@ function getPrefs(userImages = []) {
|
||||
const prefsPath = path.join(__dirname, "prefs");
|
||||
let prefs = fs.readFileSync(prefsTemplatePath, { encoding: "utf-8" });
|
||||
|
||||
// Replace line endings, just in case
|
||||
prefs = prefs.replaceAll('\r\n', '\n');
|
||||
|
||||
if (userImages && userImages.length > 0) {
|
||||
console.log(`getPrefs: Found ${userImages.length} user images`);
|
||||
userImages.forEach((file) => {
|
||||
|
Loading…
Reference in New Issue
Block a user