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

A fileContent resource for simple file contents #5

Open
jnury opened this issue Mar 18, 2018 · 9 comments
Open

A fileContent resource for simple file contents #5

jnury opened this issue Mar 18, 2018 · 9 comments
Labels
enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community.

Comments

@jnury
Copy link

jnury commented Mar 18, 2018

Hi,

The 'file' resource of PSDesiredStateConfiguration lake the ability to create file in different encodings (ascii, utf8 without bom etc...). I haven't find any DSC resource that propose to create files in ASCII, so I planned to write a new one to just create a file with the specified content and selected encoding.

As the fileContent resource is already here and propose similar functionalities, would-you mind if I create a PR with a new 'fileContent' resource for simple files ?

@PlagueHO
Copy link
Member

Hi @jnury - sure! I would gratefully accept the PR! I have adopted the standard contribution policies and style guidelines of the DSC Resource Kit.

@PlagueHO PlagueHO added enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community. labels Mar 29, 2018
@jcwalker
Copy link
Contributor

I want to bring this back from the dead @jnury @PlagueHO .
What do you think about adding an Encoding parameter to all the resources? It's should be a quick win being that Set-Content has an Encoding parameter.

@PlagueHO
Copy link
Member

HI @jcwalker - I'd be grateful for the assist - I've not had much time of late to get DSC stuff done.

Regarding the expected behavior: If the Encoding parameter was specified, but it differed from the Encoding on the existing file, would you expect that the file encoding was corrected on the file?

I think as a consumer of the resource that a file would be converted to the correct format.

@jcwalker
Copy link
Contributor

I agree. I would think if the desired encoding was different than the original file it would be converted.

@jcwalker
Copy link
Contributor

Are we agreeing that we should move forward with using the Encoding parameter instead of creating a new resource? I would be happy to own this and could start early next week.

@PlagueHO
Copy link
Member

@jcwalker - absolutely agree! And I'd love the help if you're up for submitting a PR. I haven't had as much time to put into these projects lately (hands full on the DSC Resource kit).

@jcwalker
Copy link
Contributor

@PlagueHO cool!, I plan to submit a PR for this issue and issue #13 within the next two weeks

@nehrua
Copy link
Contributor

nehrua commented Aug 20, 2018

@PlagueHO I discussed this issue with @jcwalker and I'll be picking this up for him.

@PlagueHO
Copy link
Member

Awesome - thanks @nehrua

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community.
Projects
None yet
Development

No branches or pull requests

4 participants