mirror of
https://github.com/Azure/k8s-deploy.git
synced 2026-04-10 16:02:16 +08:00
fix regex bug (#170)
This commit is contained in:
parent
4810ff9a3e
commit
961b316a51
@ -119,7 +119,7 @@ export function substituteImageNameInSpecFile(
|
||||
if (spec.indexOf(imageName) < 0) return spec;
|
||||
|
||||
return spec.split("\n").reduce((acc, line) => {
|
||||
const imageKeyword = line.match(/^ *image:/);
|
||||
const imageKeyword = line.match(/^ *-? *image:/);
|
||||
if (imageKeyword) {
|
||||
let [currentImageName] = line
|
||||
.substring(imageKeyword[0].length) // consume the line from keyword onwards
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user