Comments (9)
The backup would be nice and allow us to automatically reset on failures (so you aren't left with a bunch of files that sale [delete_me]
.
Probably would want to make it controllable via a param -b --backup
. Not sure if the default would be on or off. (if off we would still use a tmp
folder to allow us to restore on failure)
A second command sfdx force:source:clean:undo
could be added to undo a successful clean
from force-source-clean.
maybe the param isn't needed... I guess it would only be if someone didn't want the command creating a .clean.bak
file
from force-source-clean.
i'd vote for it just being used if something went wrong, i.e. if something errors don't put the onus on the user to recover it, but if they just screwed it up (say they ran clean with the wrong org) the onus would be on them to use source control to clean it up ...
from force-source-clean.
released in 0.0.3
from force-source-clean.
so how is this working?
was using today and got an error about an unexpected file due to some merge conflict artifacts, but wasn't automatically restored, but maybe there is an extra step?
ran plugins update, and pulled down the latest code for my local version from master, could have messed that up and ended up using an old version
from force-source-clean.
https://github.com/ChuckJonas/force-source-clean/blob/master/src/commands/force/source/clean.ts#L86
I only did very limited testing, so it's highly possible there is a bug.
Looks like it's only handling errors on the retrieve
cmd (the markContents
code should also be moved inside the handler), but it sounds like that's where your failure occurred.
Next time, please zip your project so we can reproduce.
You can run sfdx plugins
to determine if the plugin is linked via npm or local source (it will say link
followed by the path).
from force-source-clean.
sending you a zip, although fairly easy to reproduce, just copy any class and change to MyClass.cls.orig to mimic a merge artifact
output
➜ example git:(test) ✗ sfdx force:source:clean -x manifest/package.xml -n
(node:30064) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added. Use emitter.setMaxListeners() to increase limit
WARNING: Failed to retrieve! All files are "marked" and will need to be manually reset!
ERROR running force:source:retrieve: Unexpected file found in package directory: /afolder/aproject/src/main/default/classes/SomeClass.cls.orig
from force-source-clean.
@ChuckJonas scratch that, the example repo i had was pretty big and was taking forever to upload, a lot easier to just have you copy an apex class and add .orig suffix and then run the command
from force-source-clean.
@ralphcallaway What do you see when your run sfdx plugins
for force-source-clean
?
I've tried to repro this with both the steps above and the topcon project (both from source and via the npm install), but can't. Maybe I just don't have the right repo steps...
from force-source-clean.
Related Issues (15)
- default -x
- -f insted of -n for skip prompt? HOT 1
- Basic Test Suite
- Dont Change File Permissions on Clean HOT 3
- Include Fields on Managed Objects HOT 4
- Improvement: Respect .forceIgnore HOT 6
- Do not work with sfdx-cli/7.123.1 HOT 2
- Emails Incorrectly Cleaned HOT 2
- Incorrectly Deletes Text Static Resources HOT 14
- Non SFDX File in Package Directory Breaks Clean HOT 5
- Spinner During Clean HOT 2
- Add Command Line Automate to match standard functions HOT 2
- Support Auto Completing Manifest Name (Ref #17) HOT 4
- Missing module 'tmp' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from force-source-clean.