Example `hookSource` incorrectly uses Bash instead of `sh`

未关闭
#906 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@netapp-shwetav 已经在做这个了。

开始于 2026年9月10日。

评估

这个 Issue 还没有评估数据。

描述

Page URL

https://docs.netapp.com/us-en/trident/trident-protect/trident-protect-use-execution-hooks.html

Page title

Manage Trident Protect execution hooks

Summary

The ExecHook example uses an invalid hookSource:

https://github.com/NetAppDocs/trident/blob/b0d5f95844a49792a1e6e70c6b93c6241943aef5/trident-protect/trident-protect-use-execution-hooks.adoc?plain=1#L126

The script is IyEvYmluL2Jhc2gKZWNobyAiZXhhbXBsZSBzY3JpcHQiCg== which decodes to this script:

#!/bin/bash
echo "example script"

This indicates that Bash should be used to execute the script, while the ExecHook will actually invoke the script using sh. I found this out by some long bouts with trial and error when I found out that my documented examples did not work as expected.

This should be changed to something like #!/usr/bin/env sh for correctness.

Public issues must not contain sensitive information
  • This issue contains no sensitive information.
主要语言
没有语言数据
星标
1
派生
22
平均合并
11 小时 13 分钟
30 天内合并 PR
4

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

NetAppDocs/trident 的其他 Issue

查看 NetAppDocs/trident 的全部 Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。