You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何设置Aginity Workbench生成Unix格式文件(仅LF而非CR\LF)

Fixing Aginity Workbench to Generate Unix (LF) Line Endings

Great question! Line-ending mismatches between Windows and Unix environments are such a common pain point—especially when dealing with version control like SVN. Here are a few reliable ways to get Aginity Workbench to output files with LF instead of CRLF, or work around the issue seamlessly:

1. Check Aginity Workbench's Built-in Settings

First, see if you can configure the app directly to use Unix-style line endings:

  • Open Aginity Workbench and go to Tools > Options (depending on your version, this might be under File > Preferences).
  • Navigate to the Editor or File Saving section. Look for a setting labeled Line Endings, Newline Format, or similar.
  • If available, select Unix (LF) as the default option. From then on, any new or saved files will use LF line endings automatically.

2. Configure SVN to Handle Line Endings Automatically

If Aginity doesn’t have a built-in line-ending setting (some older versions don’t), let SVN do the heavy lifting for you. This avoids needing to run tr -d \r manually every time:

  • Edit your SVN configuration file:
    • On Windows: %APPDATA%\Subversion\config
    • On Unix: ~/.subversion/config
  • Find the [auto-props] section (uncomment it if it’s commented out) and add a rule for your file types (e.g., SQL files):
    [auto-props]
    *.sql = svn:eol-style=LF
    
  • This tells SVN to convert all .sql files to LF line endings when they’re committed to the repository. When you check out files on your Unix dev environment, they’ll already have LF endings—no post-processing needed.
  • If you want SVN to adapt to the OS but ensure consistency, you can use svn:eol-style=native instead, but LF is safer if your target environment is always Unix.

3. Post-Save Conversion Tools

If the above options don’t work, use a tool to convert CRLF to LF right after saving in Aginity:

  • Install dos2unix on Windows (via Chocolatey: choco install dos2unix).
  • Create a simple batch script that runs dos2unix on the file you just saved in Aginity, then set it as an external tool in Aginity to run automatically on save.
  • Alternatively, use editors like VS Code or Notepad++ to re-save files in Unix format:
    • VS Code: Click the "CRLF" indicator in the bottom-right corner, select "LF", then save.
    • Notepad++: Go to Edit > EOL Conversion > Convert to Unix (LF).

Bonus: Fix Existing Repository Files

If you already have files in SVN with CRLF endings, you can fix them all at once:

  1. Set the svn:eol-style=LF property on all existing files in the repository.
  2. Update your local working copy—SVN will automatically convert the line endings to LF.
  3. Commit the converted files to the repository so future checkouts are consistent.

内容的提问来源于stack exchange,提问作者Petro

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.22 09:47:52