mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-21 16:13:12 +09:00
Update flags for output file
Co-authored-by: Hornwitser <github@hornwitser.no>
This commit is contained in:
1 parent
8dcb2197d6
commit
9a4241e4cd
1 file changed
+1
-1
@@ -61,7 +61,7 @@ async function copyTemplateFile(src, dst, properties) {
|
|||||||
|
|
||||||
// Attempt to write the output file, warn if it already exists
|
// Attempt to write the output file, warn if it already exists
|
||||||
try {
|
try {
|
||||||
await fs.outputFile(dst, outputData);
|
await fs.outputFile(dst, outputData, { flag: "wx" });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (err.code === "EEXIST") {
|
if (err.code === "EEXIST") {
|
||||||
logger.warn(`Could not create file ${dst} because it already exists`);
|
logger.warn(`Could not create file ${dst} because it already exists`);
|
||||||
|
|||||||
Reference in new issue
Block a user