Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
static storingArtifactsAt(...destination: string[]): ArtifactArchiver {
ensure('Path to destination directory', destination, property('length', isGreaterThan(0)));
const pathToDestination = destination.map(segment => new Path(segment)).reduce((acc, current) => acc.join(current));
return new ArtifactArchiver(new FileSystem(pathToDestination));
}
constructor(value: string) {
super();
ensure(Path.name, value, isDefined(), property('length', isGreaterThan(0)));
this.value = path.normalize(value);
}