Skip to content

Commit

Permalink
fix/ none directory files no longer cause error
Browse files Browse the repository at this point in the history
  • Loading branch information
todd-teese committed Oct 7, 2021
1 parent bfc06a4 commit f95b704
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ An update on the profile generation tool
[![License](https://img.shields.io/npm/l/salesforce-profile-generator.svg)](https://github.com/todd-teese/salesforce-profile-generator/blob/master/package.json)

<!-- toc -->
* [Debugging your plugin](#debugging-your-plugin)

<!-- tocstop -->
<!-- install -->
<!-- usage -->
Expand All @@ -22,7 +22,7 @@ $ npm install -g salesforce-profile-generator
$ sfdx COMMAND
running command...
$ sfdx (-v|--version|version)
salesforce-profile-generator/0.0.5 linux-x64 node-v14.17.6
salesforce-profile-generator/0.0.7 linux-x64 node-v14.17.6
$ sfdx --help [COMMAND]
USAGE
$ sfdx COMMAND
Expand Down Expand Up @@ -53,5 +53,5 @@ OPTIONS
this command invocation
```

_See code: [lib/commands/generate/profile.js](https://github.com/todd-teese/salesforce-profile-generator/blob/v0.0.5/lib/commands/generate/profile.js)_
<!-- commandsstop -->
_See code: [lib/commands/generate/profile.js](https://github.com/todd-teese/salesforce-profile-generator/blob/v0.0.7/lib/commands/generate/profile.js)_
<!-- commandsstop -->
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "salesforce-profile-generator",
"description": "An update on the profile generation tool",
"version": "0.0.6",
"version": "0.0.7",
"author": "Todd Teese",
"bugs": "https://github.com/todd-teese/salesforce-profile-generator/issues",
"dependencies": {
Expand Down
5 changes: 5 additions & 0 deletions src/commands/generate/profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ export default class Profile extends SfdxCommand {

for(const profilePath of profilePaths) {
const profile = {name:profilePath};
const lsStat = fs.lstatSync(source + '/' + profilePath);
if(lsStat.isDirectory() == false) {
continue;
}
const profileFiles = this.getDirectory(source + '/' + profilePath);

for(const profileFile of profileFiles) {
this.applyFileData(source + '/' + profilePath + '/' + profileFile, profileFile, profile);
}
Expand Down

0 comments on commit f95b704

Please sign in to comment.