hi icon indicating copy to clipboard operation
hi copied to clipboard

New directory nesting

Open timmytofu opened this issue 10 years ago • 2 comments

In version 0.0.8.2 the template would be cloned at the top level, now it's a level deeper. For example, if I used to have a package named foo in a repo that looked like bar/baz, I could clone it in my current directory and get bar/baz (writing into any existing bar directory), now I get foo/bar/baz. Is there any way to force the old behavior? This change has broken all my scripts.

timmytofu avatar Jan 20 '15 17:01 timmytofu

Thanks for reporting and sorry for reply.

Is there any way to force the old behavior?

No, now the files will be created under directory with specified package name.

If the directory can be specified, does it solve your problem? I thought generating them to current directory like below might help the situation.

$ hi foo -d ./
Creating new project with git repository:git://github.com/fujimura/hi-hspec.git
    create  .gitignore
    create  LICENSE
    create  README.md
    create  foo.cabal
    create  src/Foo.hs
    create  src/Foo/Internal.hs
    create  test/FooSpec.hs
    create  test/Spec.hs

There was already a request for this feature(#17) so I'll start to implement it anyway.

fujimura avatar Jan 25 '15 14:01 fujimura

Probably. As I have it set now (with 0.0.8.2) I have a template repo that looks like /services/package-name/… with the good stuff underneath there to clone. I run that from the root directory of another repo where I have a services/ directory in which a bunch of services live cloned from the same template. 0.0.8.2 would clone a new service into the services directory with the given package name. I'd be happy if adding an extra parameter (-d ./) would make it run like that, or I'd also be willing to get rid of the top level /services directory from the template and specify the directory parameters as -d ./services/. For now, I'm hanging out at 0.0.8.2, though.

timmytofu avatar Jan 25 '15 22:01 timmytofu