fix(deploy): the GRUB fallback's mode checked as git keeps it
All checks were successful
CI / check (push) Successful in 45m56s
All checks were successful
CI / check (push) Successful in 45m56s
The test read the working tree's mode, which follows the umask of whoever checked it out. CI's runner checks out under 0077, so the script stood there as 0700 and the test, asking for every execute bit, failed though git keeps it as 100755. It now asks git, which is what the host checks out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
776b80e6ae
commit
372de0e039
1 changed files with 13 additions and 2 deletions
|
|
@ -292,9 +292,20 @@ void main() {
|
||||||
contains(r'[ -e "/boot/vmlinuz-$version" ] || continue'),
|
contains(r'[ -e "/boot/vmlinuz-$version" ] || continue'),
|
||||||
);
|
);
|
||||||
expect(fallback, contains(r'initrd /initrd.img-$version.dracut'));
|
expect(fallback, contains(r'initrd /initrd.img-$version.dracut'));
|
||||||
|
// As git keeps it, which is what the host checks out: the working
|
||||||
|
// tree's mode follows the umask of whoever checked it out, and CI's
|
||||||
|
// runner checks out under 0077.
|
||||||
|
final mode =
|
||||||
|
Process.runSync('git', [
|
||||||
|
'ls-files',
|
||||||
|
'--stage',
|
||||||
|
'--',
|
||||||
|
'deploy/host/grub-dracut-fallback',
|
||||||
|
]).stdout
|
||||||
|
as String;
|
||||||
expect(
|
expect(
|
||||||
File('deploy/host/grub-dracut-fallback').statSync().mode & 0x49,
|
mode,
|
||||||
0x49,
|
startsWith('100755 '),
|
||||||
reason: 'executable, as update-grub runs it',
|
reason: 'executable, as update-grub runs it',
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue