Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hdiutil: resize: failed. Device not configured (6) #137

Open
cataglyphis opened this issue Jul 9, 2022 · 4 comments
Open

hdiutil: resize: failed. Device not configured (6) #137

cataglyphis opened this issue Jul 9, 2022 · 4 comments

Comments

@cataglyphis
Copy link

cataglyphis commented Jul 9, 2022

issue

hdiutil: resize: failed. Device not configured (6)
00:46:22.021 /opt/homebrew/bin/create-dmg: line 323: [: -gt: unary operator expected

create dmg command

create-dmg --volname "xxxx" --window-pos 200 120 --window-size 600 400 --icon-size 100 --icon "xxx.app" 200 150 --app-drop-link 400 150 --codesign "develop key" xxx.dmg <path>

@Benitoite
Copy link
Contributor

This line may error at -gt when one or more of the two numbers being compared is not a number. Just before this comparison, it tried to get size info from your dmg, but that failed for some reason. Perhaps it didn't create the volume properly?

@pzhlkj6612
Copy link
Contributor

This line may error at -gt when one or more of the two numbers being compared is not a number. Just before this comparison, it tried to get size info from your dmg, but that failed for some reason. Perhaps it didn't create the volume properly?

How about adding set -o pipefail into the script? It will stop the execution if hdiutil fails.

@cataglyphis
Copy link
Author

This line may error at -gt when one or more of the two numbers being compared is not a number. Just before this comparison, it tried to get size info from your dmg, but that failed for some reason. Perhaps it didn't create the volume properly?

How about adding set -o pipefail into the script? It will stop the execution if hdiutil fails.

will try that later, meet this issue only once in my build environment.

@pzhlkj6612
Copy link
Contributor

How about adding set -o pipefail into the script? It will stop the execution if hdiutil fails.

will try that later,

Well, adding set -o pipefail will not solve the failure of hdiutil resize , but let set -e stop the execution of the script if any error occurs in the pipeline. It can make the error message clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants