moremoban/moban

One letter repository names break moban

jayvdb opened this issue · 4 comments

one letter repository names like https://github.com/jayvdb/z will break moban because of its special handling for windows absolute drive letter paths https://github.com/moremoban/moban/blob/ac56511/moban/plugins/template.py#L183

Any use of a Windows absolute drive paths is incompatible with Unix users of the same repository.

A simple approach is to reject these completely, especially because they are causing a bug.

It might even be sensible to also prevent any use of Unix absolute paths inside of moban control files, at least until there are use-cases which require absolute paths. All use of absolute paths on Windows should be done using environment variable prefixes, like %SystemDrive%.

So the only valid use case I can think of is an isolated single user not wanting to share with anyone else, or usage on command line arguments.

If there are existing usages of absolute paths, a design should be done for them.

e.g. a design to allow CLI args with absolute paths: Command line arguments should be handled differently, because then the internals can be told that the value comes from a host-dependent source, and also comes from the user (who is always right..), so it can switch to allowing values which would be rejected when using a host-independent control file.

IMO, requiring ../ or ./ prefixes to force recognition of relative paths would also be ok. This would be a breaking change, but it adds clarity to the syntax, and it is a trivial change to update moban files to add this prefix.

Also #205 will introduce new syntax for paths/repositories/etc.

chfw commented

Just read your note. I have not thought of kicking out 'C:\Users\folder'.

chfw commented

will be fixed in 0.6.0 but no fixes will be applied for legacy syntax, because it will be removed in next major version, let's say 0.7.0