修复docker脚本的问题 #2

Merged
EricScottLin merged 7 commits from main into main 2025-05-31 02:41:26 +00:00
EricScottLin commented 2025-05-29 09:05:11 +00:00 (Migrated from github.com)

解决通过管道运行脚本无限卡菜单页的问题

Sourcery 总结

修复安装脚本在管道执行中挂起的问题,并清理最终输出

Bug 修复:

  • 通过向 read 命令添加 -r 选项,防止在脚本通过管道传递时出现读取提示挂起的问题

杂务:

  • 从安装脚本中删除最后的浏览器指令 echo
Original summary in English

Summary by Sourcery

Fix install script hanging in piped execution and clean up final output

Bug Fixes:

  • Prevent read prompt from hanging when script is piped by adding the -r option to read

Chores:

  • Remove the final browser instruction echo from the install script
解决通过管道运行脚本无限卡菜单页的问题 ## Sourcery 总结 修复安装脚本在管道执行中挂起的问题,并清理最终输出 Bug 修复: - 通过向 read 命令添加 -r 选项,防止在脚本通过管道传递时出现读取提示挂起的问题 杂务: - 从安装脚本中删除最后的浏览器指令 echo <details> <summary>Original summary in English</summary> ## Summary by Sourcery Fix install script hanging in piped execution and clean up final output Bug Fixes: - Prevent read prompt from hanging when script is piped by adding the -r option to read Chores: - Remove the final browser instruction echo from the install script </details>
sourcery-ai[bot] commented 2025-05-29 09:05:21 +00:00 (Migrated from github.com)
## 审查者指南

更新了 docker/install.sh,修复了通过管道运行时交互式提示挂起的问题,并清理了过时的脚本末尾 echo。

### 文件级别更改

| 变更 | 详情 | 文件 |
| ------ | ------- | ----- |
| 增强了交互式菜单提示,使其在通过管道传递时能够正确工作。 | <ul><li>将 read -p 替换为 read -pr,以确保显示提示符且反斜杠不被特殊处理。</li></ul> | `docker/install.sh` |
| 删除了过时的脚本末尾消息。 | <ul><li>删除了指示如何在浏览器中打开 noVNC 的最终 echo。</li></ul> | `docker/install.sh` |

### 可能相关的 issue

- **#0**: PR 在 docker 安装脚本的 read 命令中添加了 -r 标志,修复了无限循环问题。

---

<details>
<summary>提示和命令</summary>

#### 与 Sourcery 互动

- **触发新的审查:** 在 pull request 上评论 `@sourcery-ai review`。
- **继续讨论:** 直接回复 Sourcery 的审查评论。
- **从审查评论生成 GitHub issue:** 通过回复审查评论,让 Sourcery 从审查评论创建一个 issue。您也可以回复审查评论并使用 `@sourcery-ai issue` 从中创建一个 issue。
- **生成 pull request 标题:** 在 pull request 标题中的任何位置写入 `@sourcery-ai` 以随时生成标题。您也可以在 pull request 上评论 `@sourcery-ai title` 以随时(重新)生成标题。
- **生成 pull request 摘要:** 在 pull request 正文中的任何位置写入 `@sourcery-ai summary` 以随时在您想要的位置生成 PR 摘要。您也可以在 pull request 上评论 `@sourcery-ai summary` 以随时(重新)生成摘要。
- **生成审查者指南:** 在 pull request 上评论 `@sourcery-ai guide` 以随时(重新)生成审查者指南。
- **解决所有 Sourcery 评论:** 在 pull request 上评论 `@sourcery-ai resolve` 以解决所有 Sourcery 评论。如果您已经处理了所有评论并且不想再看到它们,这将非常有用。
- **驳回所有 Sourcery 审查:** 在 pull request 上评论 `@sourcery-ai dismiss` 以驳回所有现有的 Sourcery 审查。如果您想从新的审查开始,这将特别有用 - 不要忘记评论 `@sourcery-ai review` 以触发新的审查!

#### 自定义您的体验

访问您的 [仪表板](https://app.sourcery.ai) 以:
- 启用或禁用审查功能,例如 Sourcery 生成的 pull request 摘要、审查者指南等。
- 更改审查语言。
- 添加、删除或编辑自定义审查说明。
- 调整其他审查设置。

#### 获取帮助

- [联系我们的支持团队](mailto:support@sourcery.ai) 提出问题或反馈。
- 访问我们的 [文档](https://docs.sourcery.ai) 获取详细指南和信息。
- 通过在 [X/Twitter](https://x.com/SourceryAI), [LinkedIn](https://www.linkedin.com/company/sourcery-ai/) 或 [GitHub](https://github.com/sourcery-ai) 上关注我们,与 Sourcery 团队保持联系。

</details>
Original review guide in English

Reviewer's Guide

Updated docker/install.sh to fix hanging on interactive prompts when run through a pipe and cleaned up an obsolete end-of-script echo.

File-Level Changes

Change Details Files
Enhanced the interactive menu prompt to work correctly when piped.
  • Replaced read -p with read -pr to ensure the prompt is displayed and backslashes are not treated specially.
docker/install.sh
Removed an outdated end-of-script message.
  • Deleted the final echo instructing how to open noVNC in a browser.
docker/install.sh

Possibly linked issues

  • #0: PR adds -r flag to read command in docker install script, fixing infinite loop issue.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

<!-- Generated by sourcery-ai[bot]: start review_guide --> ```markdown ## 审查者指南 更新了 docker/install.sh,修复了通过管道运行时交互式提示挂起的问题,并清理了过时的脚本末尾 echo。 ### 文件级别更改 | 变更 | 详情 | 文件 | | ------ | ------- | ----- | | 增强了交互式菜单提示,使其在通过管道传递时能够正确工作。 | <ul><li>将 read -p 替换为 read -pr,以确保显示提示符且反斜杠不被特殊处理。</li></ul> | `docker/install.sh` | | 删除了过时的脚本末尾消息。 | <ul><li>删除了指示如何在浏览器中打开 noVNC 的最终 echo。</li></ul> | `docker/install.sh` | ### 可能相关的 issue - **#0**: PR 在 docker 安装脚本的 read 命令中添加了 -r 标志,修复了无限循环问题。 --- <details> <summary>提示和命令</summary> #### 与 Sourcery 互动 - **触发新的审查:** 在 pull request 上评论 `@sourcery-ai review`。 - **继续讨论:** 直接回复 Sourcery 的审查评论。 - **从审查评论生成 GitHub issue:** 通过回复审查评论,让 Sourcery 从审查评论创建一个 issue。您也可以回复审查评论并使用 `@sourcery-ai issue` 从中创建一个 issue。 - **生成 pull request 标题:** 在 pull request 标题中的任何位置写入 `@sourcery-ai` 以随时生成标题。您也可以在 pull request 上评论 `@sourcery-ai title` 以随时(重新)生成标题。 - **生成 pull request 摘要:** 在 pull request 正文中的任何位置写入 `@sourcery-ai summary` 以随时在您想要的位置生成 PR 摘要。您也可以在 pull request 上评论 `@sourcery-ai summary` 以随时(重新)生成摘要。 - **生成审查者指南:** 在 pull request 上评论 `@sourcery-ai guide` 以随时(重新)生成审查者指南。 - **解决所有 Sourcery 评论:** 在 pull request 上评论 `@sourcery-ai resolve` 以解决所有 Sourcery 评论。如果您已经处理了所有评论并且不想再看到它们,这将非常有用。 - **驳回所有 Sourcery 审查:** 在 pull request 上评论 `@sourcery-ai dismiss` 以驳回所有现有的 Sourcery 审查。如果您想从新的审查开始,这将特别有用 - 不要忘记评论 `@sourcery-ai review` 以触发新的审查! #### 自定义您的体验 访问您的 [仪表板](https://app.sourcery.ai) 以: - 启用或禁用审查功能,例如 Sourcery 生成的 pull request 摘要、审查者指南等。 - 更改审查语言。 - 添加、删除或编辑自定义审查说明。 - 调整其他审查设置。 #### 获取帮助 - [联系我们的支持团队](mailto:support@sourcery.ai) 提出问题或反馈。 - 访问我们的 [文档](https://docs.sourcery.ai) 获取详细指南和信息。 - 通过在 [X/Twitter](https://x.com/SourceryAI), [LinkedIn](https://www.linkedin.com/company/sourcery-ai/) 或 [GitHub](https://github.com/sourcery-ai) 上关注我们,与 Sourcery 团队保持联系。 </details> ``` <details> <summary>Original review guide in English</summary> ## Reviewer's Guide Updated docker/install.sh to fix hanging on interactive prompts when run through a pipe and cleaned up an obsolete end-of-script echo. ### File-Level Changes | Change | Details | Files | | ------ | ------- | ----- | | Enhanced the interactive menu prompt to work correctly when piped. | <ul><li>Replaced read -p with read -pr to ensure the prompt is displayed and backslashes are not treated specially.</li></ul> | `docker/install.sh` | | Removed an outdated end-of-script message. | <ul><li>Deleted the final echo instructing how to open noVNC in a browser.</li></ul> | `docker/install.sh` | ### Possibly linked issues - **#0**: PR adds -r flag to read command in docker install script, fixing infinite loop issue. --- <details> <summary>Tips and commands</summary> #### Interacting with Sourcery - **Trigger a new review:** Comment `@sourcery-ai review` on the pull request. - **Continue discussions:** Reply directly to Sourcery's review comments. - **Generate a GitHub issue from a review comment:** Ask Sourcery to create an issue from a review comment by replying to it. You can also reply to a review comment with `@sourcery-ai issue` to create an issue from it. - **Generate a pull request title:** Write `@sourcery-ai` anywhere in the pull request title to generate a title at any time. You can also comment `@sourcery-ai title` on the pull request to (re-)generate the title at any time. - **Generate a pull request summary:** Write `@sourcery-ai summary` anywhere in the pull request body to generate a PR summary at any time exactly where you want it. You can also comment `@sourcery-ai summary` on the pull request to (re-)generate the summary at any time. - **Generate reviewer's guide:** Comment `@sourcery-ai guide` on the pull request to (re-)generate the reviewer's guide at any time. - **Resolve all Sourcery comments:** Comment `@sourcery-ai resolve` on the pull request to resolve all Sourcery comments. Useful if you've already addressed all the comments and don't want to see them anymore. - **Dismiss all Sourcery reviews:** Comment `@sourcery-ai dismiss` on the pull request to dismiss all existing Sourcery reviews. Especially useful if you want to start fresh with a new review - don't forget to comment `@sourcery-ai review` to trigger a new review! #### Customizing Your Experience Access your [dashboard](https://app.sourcery.ai) to: - Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others. - Change the review language. - Add, remove or edit custom review instructions. - Adjust other review settings. #### Getting Help - [Contact our support team](mailto:support@sourcery.ai) for questions or feedback. - Visit our [documentation](https://docs.sourcery.ai) for detailed guides and information. - Keep in touch with the Sourcery team by following us on [X/Twitter](https://x.com/SourceryAI), [LinkedIn](https://www.linkedin.com/company/sourcery-ai/) or [GitHub](https://github.com/sourcery-ai). </details> </details> <!-- Generated by sourcery-ai[bot]: end review_guide -->
sourcery-ai[bot] (Migrated from github.com) reviewed 2025-05-29 09:07:41 +00:00
sourcery-ai[bot] (Migrated from github.com) left a comment

嘿 @EricScottLin - 我已经查看了你的更改,它们看起来很棒!

以下是我在审查期间查看的内容
  • 🟢 一般问题:一切看起来都很好
  • 🟢 安全性:一切看起来都很好
  • 🟢 测试:一切看起来都很好
  • 🟢 复杂性:一切看起来都很好
  • 🟢 文档:一切看起来都很好

Sourcery 对开源是免费的 - 如果你喜欢我们的评论,请考虑分享它们 ✨
帮助我变得更有用!请点击每个评论上的 👍 或 👎,我将使用反馈来改进你的评论。
Original comment in English

Hey @EricScottLin - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
嘿 @EricScottLin - 我已经查看了你的更改,它们看起来很棒! <details> <summary>以下是我在审查期间查看的内容</summary> - 🟢 **一般问题**:一切看起来都很好 - 🟢 **安全性**:一切看起来都很好 - 🟢 **测试**:一切看起来都很好 - 🟢 **复杂性**:一切看起来都很好 - 🟢 **文档**:一切看起来都很好 </details> *** <details> <summary>Sourcery 对开源是免费的 - 如果你喜欢我们的评论,请考虑分享它们 ✨</summary> - [X](https://twitter.com/intent/tweet?text=I%20just%20got%20an%20instant%20code%20review%20from%20%40SourceryAI%2C%20and%20it%20was%20brilliant%21%20It%27s%20free%20for%20open%20source%20and%20has%20a%20free%20trial%20for%20private%20code.%20Check%20it%20out%20https%3A//sourcery.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20got%20an%20instant%20code%20review%20from%20%40SourceryAI%2C%20and%20it%20was%20brilliant%21%20It%27s%20free%20for%20open%20source%20and%20has%20a%20free%20trial%20for%20private%20code.%20Check%20it%20out%20https%3A//sourcery.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https://sourcery.ai) - [Facebook](https://www.facebook.com/sharer/sharer.php?u=https://sourcery.ai) </details> <sub> 帮助我变得更有用!请点击每个评论上的 👍 或 👎,我将使用反馈来改进你的评论。 </sub> <details> <summary>Original comment in English</summary> Hey @EricScottLin - I've reviewed your changes and they look great! <details> <summary>Here's what I looked at during the review</summary> - 🟢 **General issues**: all looks good - 🟢 **Security**: all looks good - 🟢 **Testing**: all looks good - 🟢 **Complexity**: all looks good - 🟢 **Documentation**: all looks good </details> *** <details> <summary>Sourcery is free for open source - if you like our reviews please consider sharing them ✨</summary> - [X](https://twitter.com/intent/tweet?text=I%20just%20got%20an%20instant%20code%20review%20from%20%40SourceryAI%2C%20and%20it%20was%20brilliant%21%20It%27s%20free%20for%20open%20source%20and%20has%20a%20free%20trial%20for%20private%20code.%20Check%20it%20out%20https%3A//sourcery.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20got%20an%20instant%20code%20review%20from%20%40SourceryAI%2C%20and%20it%20was%20brilliant%21%20It%27s%20free%20for%20open%20source%20and%20has%20a%20free%20trial%20for%20private%20code.%20Check%20it%20out%20https%3A//sourcery.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https://sourcery.ai) - [Facebook](https://www.facebook.com/sharer/sharer.php?u=https://sourcery.ai) </details> <sub> Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews. </sub> </details>
Sign in to join this conversation.