Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Dec 21, 2024
1 parent 3ce952c commit 34a334d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions src/task/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,18 @@ impl Task {

/// prints the task name without an extension
pub fn display_name(&self) -> String {
let display_name = self.name
let display_name = self
.name
.rsplitn(2, '.')
.last()
.unwrap_or_default()
.to_string();
let config = Config::get();
if config.tasks().map(|t| t.contains_key(&display_name)).unwrap_or_default() {
if config
.tasks()
.map(|t| t.contains_key(&display_name))
.unwrap_or_default()
{
// this means another task has the name without an extension so use the full name
self.name.clone()
} else {
Expand Down
4 changes: 2 additions & 2 deletions tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ Overwrite existing <file>

User to run as

## `filetask`
## `filetask.bat`

- **Usage**: `filetask`
- **Usage**: `filetask.bat`

## `install-dev`

Expand Down

0 comments on commit 34a334d

Please sign in to comment.