From 7a0cba98e0a11f8f313fe5c3ce4be0fc05f4e1dd Mon Sep 17 00:00:00 2001 From: Andy Lee Date: Wed, 12 Aug 2026 13:46:34 +0800 Subject: [PATCH] refactor: AI review Signed-off-by: Andy Lee --- pkg/harvester/mixins/harvester-vm/impl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }