Merge pull request #644 from Yamato-Security/642-minor-touchup-remove-from-rule-path-when-updating
Fixed: To remove './' string from update path result. #642
This commit is contained in:
@@ -4,11 +4,11 @@
|
||||
|
||||
**新機能:**
|
||||
|
||||
- `config/profiles.yaml`と`config/default_profile.yaml`の設定ファイルで、出力内容をカストマイズできる。 (#165) (@hitenkoku)
|
||||
- `config/profiles.yaml`と`config/default_profile.yaml`の設定ファイルで、出力内容をカスタマイズできる。 (#165) (@hitenkoku)
|
||||
|
||||
**改善:**
|
||||
|
||||
- XXX
|
||||
- ルールのアップデート機能のルールパスの出力から./を削除した。 (#642) (@hitenkoku)
|
||||
|
||||
**バグ修正:**
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
**Enhancements:**
|
||||
|
||||
- XXX
|
||||
- Removed ./ from rule path when updating. (#642) (@hitenkoku)
|
||||
|
||||
**Bug Fixes:**
|
||||
|
||||
|
||||
@@ -217,12 +217,17 @@ impl UpdateRules {
|
||||
*update_count_by_rule_type
|
||||
.entry(tmp[3].to_string())
|
||||
.or_insert(0b0) += 1;
|
||||
let path_str: &str = if tmp[2].starts_with("./") {
|
||||
tmp[2].strip_prefix("./").unwrap()
|
||||
} else {
|
||||
tmp[2]
|
||||
};
|
||||
write_color_buffer(
|
||||
&BufferWriter::stdout(ColorChoice::Always),
|
||||
None,
|
||||
&format!(
|
||||
"[Updated] {} (Modified: {} | Path: {})",
|
||||
tmp[0], tmp[1], tmp[2]
|
||||
tmp[0], tmp[1], path_str
|
||||
),
|
||||
true,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user