mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2026-09-03 05:10:16 +03:00
Fix settings.yml write on bind mounts and skip capture specs in CI
This commit is contained in:
@@ -3,6 +3,7 @@ package stirling.software.common.util;
|
||||
import java.io.IOException;
|
||||
import java.io.StringWriter;
|
||||
import java.nio.file.AtomicMoveNotSupportedException;
|
||||
import java.nio.file.FileSystemException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
@@ -377,6 +378,9 @@ public class YamlHelper {
|
||||
StandardCopyOption.ATOMIC_MOVE);
|
||||
} catch (AtomicMoveNotSupportedException e) {
|
||||
Files.move(tmp, target, StandardCopyOption.REPLACE_EXISTING);
|
||||
} catch (FileSystemException e) {
|
||||
// Bind-mounted files (docker) reject rename with EBUSY; write in place
|
||||
Files.writeString(target, content);
|
||||
}
|
||||
} finally {
|
||||
Files.deleteIfExists(tmp);
|
||||
|
||||
@@ -6,6 +6,8 @@ import fs from "node:fs";
|
||||
|
||||
/** Walkthrough capture for the Auto Form Detection feature. Not for CI. */
|
||||
|
||||
test.skip(!!process.env.CI, "capture-only spec; not for CI");
|
||||
|
||||
const SHOT_DIR =
|
||||
process.env.SHOT_DIR ??
|
||||
path.join(import.meta.dirname, "../../../../screenshots/auto-form-detection");
|
||||
|
||||
@@ -9,6 +9,8 @@ import fs from "node:fs";
|
||||
* Dumps PNGs of every tool/admin state into SHOT_DIR (env). Not for CI.
|
||||
*/
|
||||
|
||||
test.skip(!!process.env.CI, "capture-only spec; not for CI");
|
||||
|
||||
const SHOT_DIR =
|
||||
process.env.SHOT_DIR ??
|
||||
path.join(import.meta.dirname, "../../../../screenshots/ui-review");
|
||||
|
||||
Reference in New Issue
Block a user