Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create new package in specified directory #108

Closed
AdmiringWorm opened this issue Feb 19, 2019 · 10 comments · Fixed by #119
Closed

Create new package in specified directory #108

AdmiringWorm opened this issue Feb 19, 2019 · 10 comments · Fixed by #119
Assignees
Labels
Milestone

Comments

@AdmiringWorm
Copy link
Member

Expected Behavior

Would expect the created package to be created in a subdirectory inside the directory that is selected.

Current Behavior

Currently the package will always be created in a subdirectory in the root of the workspace.

Possible Solution

Not sure yet.

Steps to Reproduce (for bugs)

  1. Open up a new work space
  2. Create a new directory in the workspace
  3. Select the directory
  4. Run Chocolatey: Create new Chocolatey package
  5. See the package will be created in the root workspace

Context

Makes me always need to move the package directory manually to a different location.

Your Environment

  • Module version used: Latest development build
  • Operating System and PowerShell version: Windows 10, Powershell 5.1.17763.316
@gep13
Copy link
Member

gep13 commented Feb 19, 2019

@AdmiringWorm this is as per the initial design. I had envisioned having a folder structure similar to the AU template, where you would open the automatic folder as the workspace, and running the new command, would simply add a new folder with the selected template.

If we can make it so that the selected folder is the target for the new command, that would be pretty cool!

@AdmiringWorm
Copy link
Member Author

opening the automatic folder kind of defeats the benefit of having certain files in the root of a repository (like, for instance a .editorconfig file), as they wouldn't be detected.

So honestly, that would be a noop for me.

I do have a feeling it would be possible to get the selected folder though, although I haven't yet been able to figure out how.

@AdmiringWorm
Copy link
Member Author

Found this: microsoft/vscode#3553

so unfortunately it seems it isn't possible to get the currently selected folder, unless creating a menu for the explorer would be an option.

@AdmiringWorm
Copy link
Member Author

If having a context menu for when a user right-click a folder (which would be enough for me), I can look into implementing that.

Thoughts?

/cc @mkevenaar @gep13

@mkevenaar
Copy link
Member

@AdmiringWorm right click on the folder in vscode? Would work for me too!

I think another option would be:
an extra (first) step to ask for a folder name, by default it's empty
if the name of the folder is entered, check if the folder exists.
If it does not exists. Ask if the folder should be created.

@AdmiringWorm
Copy link
Member Author

That certainly is also an option.

Personally I think I would prefer the ability to right click a folder though (mostly because I hate being prompted for input when it isn't necessary), not that any of them is mutually exclusive.

@gep13
Copy link
Member

gep13 commented Feb 22, 2019

@AdmiringWorm some good points being made here, especially with regard to the top level folder.

I would have no objection to having a right click option on a selected folder. I would suggest that this is in addition to the new command in the command palette.

@AdmiringWorm
Copy link
Member Author

@gep13 yeah of course, but I think the command and the menu context could use the same call as well (again, I haven't looked into this yet).

Basically, allowing the command to be passed in an argument, if it's null use the default workspace, if not use the path passed in (if at all possible).

@gep13
Copy link
Member

gep13 commented Feb 22, 2019

@AdmiringWorm yip, that sounds like a good plan!

@AdmiringWorm AdmiringWorm self-assigned this Feb 22, 2019
@AdmiringWorm AdmiringWorm added this to the 0.8.0 milestone Feb 22, 2019
@AdmiringWorm
Copy link
Member Author

@gep13 great. 😄
I will look into it during this weekend then

@AdmiringWorm AdmiringWorm changed the title New package creation always creates package in the root directory Create new package in specified directory Feb 26, 2019
gep13 added a commit that referenced this issue Feb 26, 2019
(GH-108) Adding ability to change the directory to create a new package to
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants