GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Get/Add-Content throws improved error when targeting a container by kvprasoon · Pull Request #7823 · PowerShell/PowerShell

Conversation

@kvprasoon

@kvprasoon PRASOON KARUNAN V (kvprasoon) commented Sep 19, 2018

Copy link
Copy Markdown
Contributor

PR Summary

Fix #7770
Fix #2686

Enhancing the error message as per #7770 and #2686

PR Checklist

  • PR has a meaningful title
    • Use the present tense and imperative mood when describing your changes
  • Summarized changes
  • Change is not breaking
  • Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header
  • This PR is ready to merge and is not Work in Progress.
    • If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready.
  • User-facing changes
    • Not Applicable
    • OR
    • User-facing Documentation needed
      • Issue filed - Issue link: Get-Content throws confusing error when targeting a container #7770
  • Testing - New and feature
    • Not Applicable or can only be tested interactively
    • OR
    • Make sure you've added a new test if existing tests do not effectively test the code changed
      • Add [feature] if the change is significant or affects feature tests

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@kvprasoon
PRASOON KARUNAN V (kvprasoon) requested review from Bruce Payette (BrucePay) and Andrew (anmenaga) as code owners September 19, 2018 22:13
@kvprasoon

PRASOON KARUNAN V (kvprasoon) commented Sep 20, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

Ilya (@iSazonov) I think more rules are added to CodeFactor, issues are in untouched lines.
Even CI failure is something different.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

iSazonov
Ilya (iSazonov) reviewed Sep 20, 2018
View reviewed changes
Comment thread src/System.Management.Automation/namespaces/FileSystemProvider.cs Outdated

@iSazonov Ilya (iSazonov) Sep 20, 2018

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need another message for "write" cmdlets.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@kvprasoon PRASOON KARUNAN V (kvprasoon) Sep 20, 2018

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added different error message for Write to container exception.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/System.Management.Automation/namespaces/FileSystemProvider.cs Outdated

@iSazonov Ilya (iSazonov) Sep 20, 2018

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the line.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/System.Management.Automation/namespaces/FileSystemProvider.cs Outdated

@iSazonov Ilya (iSazonov) Sep 20, 2018

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove obvious comment.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/System.Management.Automation/namespaces/FileSystemProvider.cs Outdated

@iSazonov Ilya (iSazonov) Sep 20, 2018

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove obvious comment.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
iSazonov
Ilya (iSazonov) reviewed Sep 21, 2018
View reviewed changes
Comment thread src/System.Management.Automation/resources/SessionStateStrings.resx Outdated

@iSazonov Ilya (iSazonov) Sep 21, 2018

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer {0} on end of the string because we support long paths.

Unable to write content because it is a directory: {0}

For GetContainerContentException too.
/cc Steve Lee (@SteveL-MSFT)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@kvprasoon PRASOON KARUNAN V (kvprasoon) Sep 21, 2018

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, that makes sense.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@SteveL-MSFT Steve Lee (SteveL-MSFT) Sep 21, 2018

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the updated error messages are fine, even for GetContainerContentException.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

kvprasoon reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@SteveL-MSFT

Steve Lee (SteveL-MSFT) commented Sep 21, 2018

Copy link
Copy Markdown
Member

The package validation on NJsonSchema is a known issue not related to this PR

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

SteveL-MSFT
Steve Lee (SteveL-MSFT) approved these changes Sep 21, 2018
View reviewed changes

@SteveL-MSFT Steve Lee (SteveL-MSFT) left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@iSazonov

Ilya (iSazonov) commented Sep 23, 2018

Copy link
Copy Markdown
Collaborator

Reopen the PR to restart all CIs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@iSazonov Ilya (iSazonov) closed this Sep 23, 2018
@iSazonov Ilya (iSazonov) reopened this Sep 23, 2018
@SteveL-MSFT

Steve Lee (SteveL-MSFT) commented Sep 24, 2018

Copy link
Copy Markdown
Member

PRASOON KARUNAN V (@kvprasoon) can you rebase off master to pick up test fixes?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@iSazonov Ilya (iSazonov) self-assigned this Sep 25, 2018
PRASOON KARUNAN V (kvprasoon) added 4 commits September 28, 2018 10:33
@kvprasoon @iSazonov
Get/Add-Content throws improved error when targeting a container
cc54f0a
Get/Add-Content throws improved error when targeting a container
@kvprasoon @iSazonov
CodeFactor Fix
d307909
CodeFactor Fix
@kvprasoon @iSazonov
Review comments changes
c4f326b
Review comments changes
@kvprasoon @iSazonov
Error message changes as per review comments,
25f70d5
Error message changes as per review comments,
@iSazonov

Ilya (iSazonov) commented Sep 28, 2018

Copy link
Copy Markdown
Collaborator

PRASOON KARUNAN V (@kvprasoon) I rebased for you.

Further please create new branch in your fork for every new change (don't put commits in forked master).

kvprasoon reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kvprasoon

PRASOON KARUNAN V (kvprasoon) commented Sep 28, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

Ilya (@iSazonov) Sure, will do it, learning OSS collaboration from each PR... thanks

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@iSazonov
Ilya (iSazonov) merged commit e6702fe into PowerShell:master Sep 28, 2018
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
@kvprasoon @iSazonov
Get/Add-Content throws improved error when targeting a container (Pow…
e208010
…erShell#7823)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@iSazonov Ilya (iSazonov) iSazonov left review comments
@SteveL-MSFT Steve Lee (SteveL-MSFT) SteveL-MSFT approved these changes
@anmenaga Andrew (anmenaga) Awaiting requested review from anmenaga
@BrucePay Bruce Payette (BrucePay) Awaiting requested review from BrucePay

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@iSazonov Ilya (iSazonov)

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Get-Content throws confusing error when targeting a container Bad error message when using Get-Content with a Directory

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@kvprasoon @SteveL-MSFT @iSazonov
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.