Skip to content

Commit

Permalink
Add chmod command where required in official cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
ddalcino committed Jun 1, 2024
1 parent 4e64805 commit 7be4b76
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/State.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,9 @@ const unifiedInstallers = (host: Host) => {

const officialQtUnifiedPreamble = (host: Host) => {
const installer = unifiedInstallers(host);
return `curl -L -J -O https://download.qt.io/official_releases/online_installers/${installer}
./${installer} \\
const chmod_line = host === Host.windows ? "" : `chmod u+x ${installer} && \\\n`
return `curl -L -J -O https://download.qt.io/official_releases/online_installers/${installer} && \\
${chmod_line}./${installer} \\
--accept-licenses \\
--default-answer \\
--confirm-command install \\
Expand Down
5 changes: 4 additions & 1 deletion src/State.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,9 @@ export class State {
const between_lines = " \\\n ";
const installer_bin = this.unifiedInstallers(host);
const curl_cmd = `curl -L -J -O https://download.qt.io/official_releases/online_installers/${installer_bin}`;
const chmod_cmd = `chmod u+x ${installer_bin}`;
const get_installer_cmd =
host === Host.windows ? curl_cmd : `${curl_cmd} && \\\n${chmod_cmd}`;
const tools = [...this.selectedTools.values()].flatMap(
(toolData: ToolData) => toolData.selectedVariants()
);
Expand All @@ -511,7 +514,7 @@ export class State {
...this.modules.optionKeysTurnedOn(),
...tools,
];
return `${curl_cmd}
return `${get_installer_cmd} && \\
./${installer_bin} \\
--accept-licenses \\
--default-answer \\
Expand Down

0 comments on commit 7be4b76

Please sign in to comment.