forked from github-starred/komodo
1.15.8 (#124)
* fix all containers restart and unpause * add CommitSync to Procedure * validate resource query tags causes failure on non exist * files on host init working. match tags fail if tag doesnt exist * intelligent sync match tag selector * fix linting * Wait for user initialize file on host
This commit is contained in:
@@ -253,3 +253,14 @@ export const extract_registry_domain = (image_name: string) => {
|
||||
return "docker.io";
|
||||
}
|
||||
};
|
||||
|
||||
/** Checks file contents empty, not including whitespace / comments */
|
||||
export const file_contents_empty = (contents?: string) => {
|
||||
if (!contents) return true;
|
||||
return (
|
||||
contents
|
||||
.split("\n")
|
||||
.map((line) => line.trim())
|
||||
.filter((line) => line.length !== 0 && !line.startsWith("#")).length === 0
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user