Skip to content

fix: correct saving of custom file paths#1434

Open
nnothing1 wants to merge 3 commits intocloudwego:developfrom
nnothing1:out-dir-fix
Open

fix: correct saving of custom file paths#1434
nnothing1 wants to merge 3 commits intocloudwego:developfrom
nnothing1:out-dir-fix

Conversation

@nnothing1
Copy link

@nnothing1 nnothing1 commented Sep 19, 2025

What type of PR is this?

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en: In the package template, adding {{.ProjectDir}} introduced absolute paths,
but file generation still used relative paths, which resulted in incorrect
paths like "/path/to/rel/path/to/rel". This change normalizes path handling
during processing to ensure generated file paths are correct.

zh(optional): 在 package 模板中 添加 {{.ProjectDir}} ,会给path带上绝对路径,但是生成文件时又按相对路径生成,从而导致路径不正确(“/path/to/rel/path/to/rel ”绝对路径套绝对路径),因此在 handle 时统一路径格式,确保生成文件路径正确。

(Optional) Which issue(s) this PR fixes:

Fixes #1428

(Optional) The PR that updates user documentation:

@nnothing1 nnothing1 requested review from a team as code owners September 19, 2025 19:24
@HeyJavaBean
Copy link
Member

lgtm

@codecov
Copy link

codecov bot commented Sep 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.98%. Comparing base (b2a99fc) to head (a38697c).
⚠️ Report is 5 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1434      +/-   ##
===========================================
+ Coverage    74.16%   74.98%   +0.82%     
===========================================
  Files          147      147              
  Lines        16988    14190    -2798     
===========================================
- Hits         12599    10641    -1958     
+ Misses        3794     2954     -840     
  Partials       595      595              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

自定义模板中使用 update_behavior: type: "skip" 不生效

2 participants