diff --git a/pkg/harvester/mixins/harvester-vm/impl.js b/pkg/harvester/mixins/harvester-vm/impl.js index f252f88f..8fd2fa92 100644 --- a/pkg/harvester/mixins/harvester-vm/impl.js +++ b/pkg/harvester/mixins/harvester-vm/impl.js @@ -38,7 +38,7 @@ export const SSH_EXISTING_TYPE = { export default { methods: { hasCloudConfigComment(userScript) { - if (typeof userScript === 'string' && /(^|\n)\s*#cloud-config(\s|$)/.test(userScript)) { + if (typeof userScript === 'string' && /^\s*#cloud-config(\s|$)/.test(userScript)) { return true; }