Skip to content

fix(snippet create): use filename when path missing

Jay McCure requested to merge jmc-7601 into main

Description

When creating a snippet if a path was not passed but the --title and --filename flags were passed, the cli would hang.

Now we use the --filename as the path, as indicated by the existing error message (https://gitlab.com/gitlab-org/cli/-/blob/fd155babc724b510cab252c0c592120524381e86/commands/snippet/create/create.go#L61-61)

Related Issues

Resolves #7601 (closed)

How has this been tested?

Manually tested below, test added.

Screenshots (if appropriate):

Before (hangs): Screenshot_2024-07-05_at_14.38.29

After: Screenshot_2024-07-05_at_14.38.59

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation
  • Chore (Related to CI or Packaging to platforms)
  • Test gap
Edited by Jay McCure

Merge request reports

Loading