← Back to issue list

`snapcraft init` fails when the working directory's name is longer than 40 characters

View original Github issue

Metadata

Project
snapcraft
Number
#6093
Type
issue
State
open
Author
brlin-tw
Labels
Created
2026-03-12 13:12:38+00:00
Updated
2026-03-12 13:12:38+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

### Check existing issues - [x] I've verified that this bug isn't described by any existing issues. ### Bug description Project initialization command should still work even when the name of the working directory is longer than usual. ### Steps to reproduce ```bash mkdir this-working-directory-has-a-very-long-name cd this-working-directory-has-a-very-long-name snapcraft init ``` ### Current behavior ```text $ snapcraft init Invalid snap name 'this-working-directory-has-a-very-long-name': snap names must be 40 characters or less. Recommended resolution: Provide a valid name with '--name' or rename the project directory. Full execution log: '/home/brlin/.local/state/snapcraft/log/snapcraft-20260312-211208.774528.log' ``` ### Environment **OS:** Ubuntu 25.10 **Snapcraft:** 8.14.0.post68 (17232) **Locale:** zh\_TW.UTF-8 ### snapcraft.yaml ```yaml # N/A ``` ### Log output ```shell N/A ```

Evaluation history

No evaluation history available.