On my system(Debian Testing, technically 12), some of the required utilities are located in /sbin, which is not in the user's $PATH by default. If running the script without sudo, it will fail to find various utilities like 'sfdisk', which is really at /sbin.
My workaround is to put PATH="/sbin:$PATH" before the command to make it work. I think it should have a more robust detection scheme, though.
On my system(Debian Testing, technically 12), some of the required utilities are located in /sbin, which is not in the user's $PATH by default. If running the script without sudo, it will fail to find various utilities like 'sfdisk', which is really at /sbin.
My workaround is to put PATH="/sbin:$PATH" before the command to make it work. I think it should have a more robust detection scheme, though.