2026-01-30 13:31:20 +01:00
|
|
|
import * as core from '@actions/core';
|
2021-06-22 19:18:21 +02:00
|
|
|
/**
|
|
|
|
|
* Returns a copy with defaults filled in.
|
|
|
|
|
*/
|
2026-01-30 13:31:20 +01:00
|
|
|
export function getOptions(copy) {
|
2021-06-22 19:18:21 +02:00
|
|
|
const result = {
|
|
|
|
|
followSymbolicLinks: true,
|
|
|
|
|
implicitDescendants: true,
|
|
|
|
|
matchDirectories: true,
|
2025-06-14 22:45:43 +02:00
|
|
|
omitBrokenSymbolicLinks: true,
|
|
|
|
|
excludeHiddenFiles: false
|
2021-06-22 19:18:21 +02:00
|
|
|
};
|
|
|
|
|
if (copy) {
|
|
|
|
|
if (typeof copy.followSymbolicLinks === 'boolean') {
|
|
|
|
|
result.followSymbolicLinks = copy.followSymbolicLinks;
|
|
|
|
|
core.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`);
|
|
|
|
|
}
|
|
|
|
|
if (typeof copy.implicitDescendants === 'boolean') {
|
|
|
|
|
result.implicitDescendants = copy.implicitDescendants;
|
|
|
|
|
core.debug(`implicitDescendants '${result.implicitDescendants}'`);
|
|
|
|
|
}
|
|
|
|
|
if (typeof copy.matchDirectories === 'boolean') {
|
|
|
|
|
result.matchDirectories = copy.matchDirectories;
|
|
|
|
|
core.debug(`matchDirectories '${result.matchDirectories}'`);
|
|
|
|
|
}
|
|
|
|
|
if (typeof copy.omitBrokenSymbolicLinks === 'boolean') {
|
|
|
|
|
result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks;
|
|
|
|
|
core.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`);
|
|
|
|
|
}
|
2025-06-14 22:45:43 +02:00
|
|
|
if (typeof copy.excludeHiddenFiles === 'boolean') {
|
|
|
|
|
result.excludeHiddenFiles = copy.excludeHiddenFiles;
|
|
|
|
|
core.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`);
|
|
|
|
|
}
|
2021-06-22 19:18:21 +02:00
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
//# sourceMappingURL=internal-glob-options-helper.js.map
|