Title: Import-CSV Uses Parent Folder After Error · Issue #11411 · PowerShell/PowerShell · GitHub
Open Graph Title: Import-CSV Uses Parent Folder After Error · Issue #11411 · PowerShell/PowerShell
X Title: Import-CSV Uses Parent Folder After Error · Issue #11411 · PowerShell/PowerShell
Description: Import-CSV Looks in Parent Directory After throwing an error using ConvertFrom-String, Import-Csv no longer uses the current directory, but looks in the parent directory instead. I'll add my code so you may simulate the same thing. This ...
Open Graph Description: Import-CSV Looks in Parent Directory After throwing an error using ConvertFrom-String, Import-Csv no longer uses the current directory, but looks in the parent directory instead. I'll add my code s...
X Description: Import-CSV Looks in Parent Directory After throwing an error using ConvertFrom-String, Import-Csv no longer uses the current directory, but looks in the parent directory instead. I'll add my co...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/11411
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Import-CSV Uses Parent Folder After Error","articleBody":"### Import-CSV Looks in Parent Directory\r\nAfter throwing an error using ConvertFrom-String, Import-Csv no longer uses the current directory, but looks in the parent directory instead. I'll add my code so you may simulate the same thing. This code throws an error on ConvertFrom-String, which appears to generate the directory issue on the Import-Csv, but not other cmdlets like Get-Item or Get-Content.\r\n\r\n$PSVersionTable: \r\nPSRemotingProtocolVersion - 2.3 \r\nPlatform - Win32NT \r\nPSVersion - 7.0.0-rc.1 \r\nPSCompatibleVersions - {1.0, 2.0, 3.0, 4.0...} \r\nOS -Microsoft Windows 10.0.18362 \r\nGitCommitId - 7.0.0-rc.1 \r\nWSManStackVersion - 3.0 \r\nPSEdition - Core \r\nSerializationVersion - 1.1.0.1 \r\n\r\n### Steps to Reproduce\r\nCode:\r\n```\r\n$imp = Import-Csv .\\TestColumn.csv\r\n$Template = @'\r\n{Type*:IP4Address},{IP:10.20.30.40}\r\n'@\r\n$imp.col2 | ConvertFrom-String -TemplateContent $Template -PropertyNames Type,IP\r\nImport-Csv `.\\TestColumn.csv\r\n```\r\nContent in the IP file (fake IPs... of course)\r\n```\r\ngc .\\TestColumn.csv\r\nCol1,Col2\r\nOne,@{IP4Address=10.20.30.41}\r\nTwo,@{IP4Address=10.20.30.42}\r\nThree,@{IP4Address=10.20.30.43}\r\nFour,@{IP4Address=10.20.30.44}\r\n```","author":{"url":"https://github.com/rgroefer","@type":"Person","name":"rgroefer"},"datePublished":"2019-12-20T16:19:50Z","url":"https://github.com/PowerShell/PowerShell/issues/11411"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:07af6765-6dc2-2947-5bb3-0f3d06418348 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D25A:84D31:1FECAE:2B5A78:6AFD44E4 |
| html-safe-nonce | a15d4ee88e31b1f03d3f664b4fd5c9261c73825e4db5fd7b330b83d07a6677d4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMjVBOjg0RDMxOjFGRUNBRToyQjVBNzg6NkFGRDQ0RTQiLCJ2aXNpdG9yX2lkIjoiMTgxMTg3MjUwNDM5ODgyNDY3NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 1b2fd7aca2e7ed45013b5dcf58444f12dddb577fd856dab0ad86417bd99127a8 |
| hovercard-subject-tag | issue:541075377 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/11411/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6d133b6599e93b25d8e2471c96c4a6cd3e4b24b700a353288f8f3c96312a1f15/PowerShell/PowerShell/issues/11411 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6d133b6599e93b25d8e2471c96c4a6cd3e4b24b700a353288f8f3c96312a1f15/PowerShell/PowerShell/issues/11411 |
| og:image:alt | Import-CSV Looks in Parent Directory After throwing an error using ConvertFrom-String, Import-Csv no longer uses the current directory, but looks in the parent directory instead. I'll add my code s... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rgroefer |
| hostname | github.com |
| expected-hostname | github.com |
| None | bdbacc25b921224ff0befcb9e629560a1255be51aec9991d6e3f95b5e9151474 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 556dd37bb0aceffb25724e151b5d858b3265b40b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width